I\'m unable to ssh to my EC2 server and am getting the error:
ssh -i /Users/Skeniver/Keepass/skeniver.pem ubuntu@xx.xxx.xx.xxx
Identity file /Users/Skeniver/Kee
my solution is move it to the path which is all the english chars
(i am a chinese, and use the chinese windows, when i run the command from the path which contains the chinese chars, it will return "Warning: Identity file debao-visa.pem not accessible: No such file or directory.")
I had the same problem and i found that the issue with the file path. Right click on the your key_pair.pem (identical file) go the properties and copy and now your comment is like
ssh -i /path/skeniver.pem user@your_public_ip
for example in my case command like
ssh -i /home/anil/.ssh/webKey.pem ec2-user@ec2-45-349-50-38.us-west-2.compute.amazonaws.com
You need the identity file to login to the box. Use the command
ssh -i (identity_file) username@hostname
chmod 600 ~/.ssh/public_key_file
solved for me
run the command from .ssh directory i.e/Users//.ssh and then execute the command ssh -v -i @
this worked for me after many failed attempt.
note: please make sure .pem file has necessary permission chmod 400 <.pem file> before executing the command
For your case just
just execute the following command to change permission
sudo chmod 400 /Users/Skeniver/Keepass/skeniver.pem
and then execute the command that will connect you to EC2
ssh -i /Users/Skeniver/Keepass/skeniver.pem ubuntu@xx.xxx.xx.xxx