Connect To Ec2 Instance Server Via Cli

[Solved] Connect To Ec2 Instance Server Via Cli | Shell - Code Explorer | yomemimo.com
Question : Connect to EC2 instance / server via CLI / ssh

Answered by : splendid-skipper-8yz995le7djw

//First move the private key file ending with .pem extension to ~/.ssh folder
mv Downloads/file.pem ~/.ssh/
//then change its permissions to avoid a certain error at ec2 console
chmod 400 .ssh/file.pem
//Now final command to connect as ec2 user
ssh -i ~/.ssh/file.pem ec2-user@ipOfInstance

Source : | Last Update : Sat, 13 May 23

Answers related to connect to ec2 instance server via cli ssh

Code Explorer Popular Question For Shell