【发布时间】:2016-05-02 20:00:02
【问题描述】:
我正在表演:
# copy public key to other hosts
for host in ec2-master.eu-west-1.compute.amazonaws.com \
ec2xxx.compute.amazonaws.com \
ec2xxx.compute.amazonaws.com; \
do ssh-copy-id -i ~/.ssh/id_rsa.pub $host; \
done
所以我尝试将在 ec2-master.eu-west-1.compute.amazonaws.com 上生成的密钥复制到其他服务器。 但我还是得到了
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
The authenticity of host 'ec2xxx.eu-west-1.compute.amazonaws.com (10.0.xx.xx)' can't be established.
ECDSA key fingerprint is 3a:63xx:a6:19:xx:23:d1:xx:06:22:xx:a0:b9:8c:xx:cf.
Are you sure you want to continue connecting (yes/no)?
所以我的权限被拒绝了。但我不知道为什么。我做错了什么?
【问题讨论】:
-
输入
yes会发生什么? -
我输入了是。但是权限仍然被拒绝。当我再次尝试时,它不会再次询问 ECDSA 密钥指纹,但仍会返回权限被拒绝
标签: bash amazon-web-services ssh-keys ssh-keygen