我正在使用此链接
https://www.digitalocean.com/community/tutorials/how-to-connect-to-your-droplet-with-ssh
我懂了
root@milenko-HP-Compaq-6830s:~# ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-L0mlehDNyPEa/agent.18238; export SSH_AUTH_SOCK;
SSH_AGENT_PID=18239; export SSH_AGENT_PID;
echo Agent pid 18239;
root@milenko-HP-Compaq-6830s:~# ssh-add ~/.ssh/id_rsa
/root/.ssh/id_rsa: No such file or directory
这是什么意思?
root@milenko-HP-Compaq-6830s:~/.ssh# ls
known_hosts
ps aux | grep ssh
root 17889 0.0 0.0 11232 332 ? Ss 14:04 0:00 ssh-agent -s
root 17983 0.0 0.0 11232 332 ? Ss 14:07 0:00 ssh-agent -s
root 17988 0.0 0.0 11232 332 ? Ss 14:07 0:00 ssh-agent bash
root 18032 0.0 0.0 11232 332 ? Ss 14:10 0:00 ssh-agent
root 18034 0.0 0.0 11232 332 ? Ss 14:11 0:00 ssh-agent
root 18056 0.0 0.0 11232 328 ? Ss 14:11 0:00 ssh-agent -s
root 18237 0.0 0.0 11232 332 ? Ss 14:22 0:00 ssh-agent -s
root 18239 0.0 0.0 11232 332 ? Ss 14:22 0:00 ssh-agent
root 18405 0.0 0.0 21292 952 pts/2 S+ 14:32 0:00 grep --color=auto ssh
known_hosts 里面是我的 pyblic 密钥。出了什么问题?
答案1
/root/.ssh/id_rsa: No such file or directory
这是什么意思?
它的意思正是它所说的。该文件不存在。本教程希望您以某种方式拥有此类密钥。评论中讨论了如何创建密钥(ssh-keygen
)。