How to connect to Amazon EC2 with SSH from Mac OS

Connecting to my Amazon EC2 image from Mac Os X took ages to find out and turned out to be relatively simple with the correct information Fugu, RBrowser, CyberDuck etc could not handle the Amazon public/private key encryption. you need to use Puttygen to convert the Amazon .ppk file to OpenSSH format. The OpenSSH format can be used by the Mac OS X (OpenSSH) ssh client. Many forums recommend Elasticfox Firefox extension for managing your AWS instances. Clicking the “Connect to Instance” button in Elasticfox just opens terminal with the SSH command.




First, you need to generate an SSH key pair.

The AWS Management Console makes this easy.

Choose “Key Pairs” from the left menu bar under EC2. Follow the instructions, and download your *.pem somewhere you’ll remember.

ssh -i the-keypair-filename root@yourdomain.com

– Keypair file must be in same directory. – I just used terminal to connect.

Make sure you generate or assign the keypair when launching the instance.

Also you can verify the keypair you have set in the AWS Management Console, this is done by selecting the running instance and then looking for “Key Pair Name:”.

Leave a Reply

Your email address will not be published.