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
Python Module Import Error for One User But Not the Other
How to Check If a Service That I Don't Know the Name of Is Running on Ubuntu
How to Edit a Binary File on Unix Systems
How to Run Vi on Docker Container
How to Pass Argument in Expect Through the Command Line in a Shell Script
Listen on a Network Port and Save Data to a Text File
How to Open Sublime Text 2 Files from the Command Line in Linux to a Tab, Not a New Window
How to Write a Linux Daemon with .Net Core
How to Get the Variable Value Inside the Eof Tags
Grabbing Specific Sections of Text from a String
Highlight Text Similar to Grep, But Don't Filter Out Text
Linux Kernel "Historical" Git Repository with Full History
How to Perform a 'Git Pull' Without Re-Entering My Ssh Password
How to Run Nohup and Write Its Pid File in a Single Bash Statement
Difference Between Netstat and Ss in Linux