Connecting to Amazon Aws Linux Server by Ssh on MAC

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>

Connecting to EC2 Instance via Terminal on Mac

Try the following steps in your terminal:

ssh-keygen -R 12.345.678.999 // This Reset your publickey

Then try to access with your Key Pair Name and Public DNS of EC2:

ssh -i KeyPairName.pem ubuntu@ec2-xx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com


Related Topics



Leave a reply



Submit