9
6
I have a ubuntu Natty instance on EC2, and I can SSH into it by
ssh -v -i ec2-keypair ubuntu@ubuntu@XXXX.compute-1.amazonaws.com
But I'd like to set up password less sshing. So I tried these options and nothing is working:
$ ssh-copy-id -i ~/.ssh/id_rsa.pub ubuntu@XXXX.compute-1.amazonaws.com
Permission denied (publickey).
$ ssh-copy-id -i ~/.ssh/ec2-keypair ubuntu@XXXX.compute-1.amazonaws.com
/usr/bin/ssh-copy-id: ERROR: No identities found
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@XXXX.compute-1.amazonaws.com
Permission denied (publickey).
I have done this for both postgres and my admin normal user still when I run
ssh-copy-id -f -i /var/lib/postgres/.pubfilename ubuntu@ec2-domain
still getting permission denied error. – Piyush S. Wanare – 2017-03-20T07:48:02.973Note in some environments, you'll need to run
eval "$(ssh-agent)"
if you seeCould not open a connection to your authentication agent
– azatar – 2017-10-13T23:04:19.450