I have a windows as my main OS. Using VMware player, I setup a Ubuntu server 12.4 as a guest machine. The Ubuntu server have "ubuntu" user.
I created a new EC2 instance + setup pem key. From the windows machine, when I use putty+pem key - I can ssh.
I added the pem key to my VMware Ubuntu server ( /home/ubuntu/.ssh/)
In addition, i set the following permissions:
chmod 700 /home/ubuntu/.ssh
chmod 600 /home/ubuntu/.ssh/*
Through the Ubuntu server - I tried to SSH to the ec2 instance without success:
ssh ubuntu@EC2_IP Permission denied (publickey)
If I explicit use the pem key, it works:
ssh -i /home/ubuntu/.ssh/NAME.pem ubuntu@EC2_IP
- Please note, that I must use direct path to the key, otherwise, I'll get
Warning: Identity file NAME.pem not accessible: No such file or directory.
Permission denied (publickey).
Please advise. Thanks!