connecting to amazon aws linux server by ssh on mac connecting to amazon aws linux server by ssh on mac linux linux

connecting to amazon aws linux server by ssh on mac


You'll want to put the keypair in {your home directory}/.ssh . If that folder doesn't exist, create it. Once you put the keypair in there you have to change the permissions on the file so only your user can read it.Launch the terminal and type

chmod 600 $HOME/.ssh/<your keypair file>

That limits access to the file, and then to limit access to the folder type

chmod 700 $HOME/.ssh

You have to limit the access because the OpenSSH protocol won't let you use a key that other's can view.

Then to log into your instance, from the terminal you would enter

ssh -i <your home directory>/.ssh/<your keypair file> ec2-user@<ec2 hostname>


you can also create a file ~/.ssh/configchmod it 644then inside you can add something like this

host mybox-root  Hostname [the IP or dns name]  User root  IdentityFile ~/.ssh/[your keypair here]

then you can just do

$ ssh mybox-root

and you'll login easier.


You can use Java MindTerm to connect to your EC2 server in Macbook pro. It works for me. here are the more details and step by step instruction.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html