无法连接 ssh /root/.ssh/known_hosts':没有此文件或目录

无法连接 ssh /root/.ssh/known_hosts':没有此文件或目录

我无法使用 ssh 连接到我的服务器。我已经使用 ssh 启动了一个会话,但我知道如果我退出此会话,我将无法再次连接到我的服务器。

ssh [email protected]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
07:fe:8f:12:83:09:ce:87:ec:60:9d:75:b4:d2:04:12.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).

ssh -o StrictHostKeyChecking=no [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
07:fe:8f:12:83:09:ce:87:ec:60:9d:75:b4:d2:04:12.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).

我尝试:

rm /root/.ssh/known_hosts
rm: cannot remove `/root/.ssh/known_hosts': No such file or directory

ssh-keygen -R genese.com
ssh-keygen: /root/.ssh/known_hosts: No such file or directory

答案1

known_hosts文件位于客户。

你确定你知道自己在做什么吗?

相关内容