Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up a site that will have multiple development instances running on the same server. Essentially, we'd have,, etc.. all running off a single server.

I want to give each user some bit of SSH access in order to update and check in code from our Git repository and to manage files via SFTP. However, I want to restrict each user to their own site as well. So if you have access to, you don't also have access to and so on. The restriction is already in place if I login via FTP as a certain user, I can't navigate outside my own site -- but if I grant SSH access to that account I can immediately navigate to any file on the server in SFTP.

Is RSSH part of the solution? And how can I assign the correct SSH pub key to the corresponding user? We're using BeanStalk for our Git repository management if that makes any impact.

share|improve this question
up vote 2 down vote accepted

Set up a Unix permissions group for each site, add users to the appropriate group, and then modify your file/dir permissions to only allow users in the proper group to be able to access files for that site.

share|improve this answer
Thank you! Permissions are fixed, now I just need to figure out the SSH key issues and I'll be set. – ThatGuyJJ Mar 14 '11 at 0:41
Actually, I think I have it all figured out. Thank you! – ThatGuyJJ Mar 14 '11 at 1:45
No problem. Glad you got it worked out. – J. Taylor Mar 14 '11 at 2:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.