The other day I was toying with Rubber to deploy a Rails3 app to Amazon EC2. I host the project code in a private Github repository, accessible only with my own SSH key.
In order to checkout your code an any EC2 instance you can do one of two things:
Copy your private SSH key to the instance - This sounds easy enough, but has serious security implications. You do not want to be sending out your private SSH key, do you? That leaves you with option 2.
Let SSH forward the authentication request to your local machine. This is call Forwarding and requires ssh-agent
to be running on your system. You’re in luck, ssh-agent
is started automatically on your mac.
Now, the problem is that in Leopard (10.5) SSH Forwarding was enabled by default. You guessed it, in Snow Leopard it has been disabled by default. So, it’s up to you to enable SSH Forwarding manually. Here goes:
sudo vi /etc/ssh_config
Host *
ForwardAgent yes
Macintosh OS Server 1.0- 1.2v3 based on Rhapsody which is half and half of OPENSTEP from NeXT Computer and Mac OS 8.5.1. The GUI looks like the blend of MAC OS 8’s Platinum appearance with OPENSTEP’s NeXT based interface. This Blue box is for running inheritance MAC OS based applications which have a different window. There was a discussion.
All right sparky, you now have enabled SSH Forwarding. Have fun!
PS. If you have enabled “Remote Login” under Sharing Preferences, make sure to stop and start that service to notify it of the changes you just made.