[root@demo ~]# ssh-copy-id xxx.xxxx.xxx.xxx
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
有时候执行ssh-copy-id时候,会卡在上面的界面,这一般是由于对方主机上已经存在本主机信息了,登录到目标主机上,删除
~/.ssh/authroized_keys, 再次执行上述命令就可以复制了,不会再卡住了。
SSH复制公钥问题及解决方案
当使用ssh-copy-id命令时,如果遇到卡顿,可能是因为目标主机已存在本主机的密钥信息。解决办法是登录目标主机,删除~/.ssh/authorized_keys文件,然后重新执行ssh-copy-id命令,即可成功复制公钥并避免卡顿。
2734

被折叠的 条评论
为什么被折叠?



