issue when ssh-ing to EC2 instance [closed]

I am getting the following error:

sudo ssh -i -v ~/.ssh/shopious.pem ubuntu@54.245.124.178

dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Warning: Identity file -v not accessible: No such file or directory.
ssh: Could not resolve hostname /Users/myusername/.ssh/shopious.pem: nodename nor servname provided, or not known

How is this possible? I am not sure what I changed, but before it was working using the same exact command.

Answer

You have your command line wrong

ssh -v -i ~/.ssh/shopious.pem ubuntu@54.245.124.178

should work.

  • -v Verbose mode

  • -i identity file – selects a file from which the identity … is read.

You are telling ssh to use a file called -v as the identity file and to connect to host ~/.ssh/shopious.pem. You really should take a look at the ssh man page

Attribution
Source : Link , Question Author : user79356 , Answer Author : user9517

Leave a Comment