If you’re using OpenSSH to access EC2, you can tell ssh to use your ec2 public key instead of specifying the public key with the -i option when you connect to one of your ec2 instances. To do this, create or modify your ~/.ssh/config file and add:
host *.amazonaws.com IdentityFile PATH_TO_YOUR_AMAZON_EC2_KEY_PAIR
Unlike Putty, you don’t have to do anything to convert your keys. You can also tell ssh to login as ‘root’ by default by adding the line ‘user root’ under the ‘IdentityFile’ option.
One Response
Hilton
September 28th, 2007 at 12:34 pm
1Thank you so much for this tip! Not only does it make it much easier to SSH into AWS, but now I can finally get SFTP to work as well.
RSS feed for comments on this post · TrackBack URI
Leave a reply