Install Capistrano with Railsless Deploy
$> sudo gem install capistrano railsless-deploy
Copy ssh keys to production
$> scp ~/.ssh/id_rsa.pub production:/tmp/id_rsa.developer.pub
Create deployment user and ssh public key
$> sudo adduser deploy
$> su deploy
$> ssh-keygen
Copy each developer's public key to deployment's authorized_keys file
$> cat /tmp/id_rsa.developer_1.pub >> ~/.ssh/authorized_keys
$> cat /tmp/id_rsa.developer_2.pub >> ~/.ssh/authorized_keys
...
Test with ssh deploy@production
for each developer
Copy public key to version control server
$> scp ~/.ssh/id_rsa.pub git-server:/tmp/id_rsa.deploy.pub
Create git (or svn) user
$> sudo adduser git
$> su git
$> cd
$> mkdir .ssh
Copy deployment user's public key
$> cat /tmp/id_rsa.deploy.pub >> ~/.ssh/authorized_keys
Extra security? Replace git user's shell tool with /usr/bin/git-shell
in /etc/passwd
$> ssh git@git-server
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to git-server closed.