Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 无法复制rsa密钥_Ubuntu_Ssh_Digital Ocean - Fatal编程技术网

Ubuntu 无法复制rsa密钥

Ubuntu 无法复制rsa密钥,ubuntu,ssh,digital-ocean,Ubuntu,Ssh,Digital Ocean,当我尝试运行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),

当我尝试运行
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复制id-Ixyz@targetHostIP

同样的错误。

您可以手动复制它

cat ~/.ssh/id_rsa.pub
ssh
to
targetHostIP


粘贴在
~/.ssh/authorized_keys

的末尾。您可以手动复制它

cat ~/.ssh/id_rsa.pub
ssh
to
targetHostIP


粘贴在
~/.ssh/authorized_keys的末尾

欢迎使用StackOverflow!本网站旨在作为一个编程问答。对于类似于服务器配置的问题,您可能希望转到。欢迎来到StackOverflow!本网站旨在作为一个编程问答。对于像这样关于服务器配置的问题,您可能希望转到。