当我尝试运行ssh-copy-id
时,我正在关注错误:
abcd@hostOnDigitalOcean:~/.ssh$ ssh-copy-id xyz@targetHostIP
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/abcd/.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
/usr/bin/ssh-copy-id: ERROR: ssh: connect to host targetHostIP port 22: Connection timed out
我试过ssh-copy-id -i <path_of_id_rsa.pub> xyz@targetHostIP
但同样的错误。
答案 0 :(得分:0)
您可以手动复制。
cat ~/.ssh/id_rsa.pub
ssh
至targetHostIP
在~/.ssh/authorized_keys