I'm wanting to setup a web hosting service similar to Dreamhost which allows SSH. I'm wanting to know how I can go about letting users connect via SSH but prevent any type of malicious activity. What methods should I go about in securing my Debian server against users who don't like to obey the rules, or don't wish to have restrictions (accessing root). Also how would I make sure some processes aren't running too long (x seconds then it will shut down the process).
I'm also wanting to host with Apache but I've had a few enemies not enjoy my presense on the internet and attack my server using apache exploits. What patches, modules or other secruity additions should I implement to prevent my apache server from taking my server down? I understand that without a hardware firewall, there are other requests that can take down my server, but I'm looking for things that can be done from a VPS on my end.
Finally, how do I allow users to host scripts that write in their home dirs so they can perform file read and write? I have managed to get the directories to have domain www dirs, but users face issues with writing.
Thanks!