我在EC2上有一个ubuntu Natty实例,可以通过
ssh -v -i ec2-keypair ubuntu@ubuntu@XXXX.compute-1.amazonaws.com
但是我想减少密码设置。所以我尝试了这些选项,但没有任何效果:
$ 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).
ssh-copy-id -f -i /var/lib/postgres/.pubfilename ubuntu@ec2-domain
仍然运行时仍然出现权限被拒绝错误。