我和一个 friend 使用免费的 ssh 聊天应用程序。以前,他可以毫无问题地连接到我的聊天室(通过 ssh)。
但是我更改了 Linux 中的用户 session ,并且必须使用以下命令生成新的 ssh key :
ssh-keygen -t rsa -b 4096 -C "myemail@example.com"
我从新用户 session 开始 ssh 聊天。效果很好。 (我可以通过另一台本地计算机连接到聊天)
但是当我的 friend 尝试连接到聊天时,他收到以下警告:
“有时”,shell 要求他输入密码( friend 告诉我的)因此,我要求他通过以下方式清除警告消息中显示的文件known_hosts:
ssh-keygen -R myip
ssh-keygen -R -F myip
sudo ssh-keygen -R myip
sudo ssh-keygen -R - F myip
#we try severals commands
现在文件known_hosts是空的,但是当 friend 尝试通过ssh连接到我的聊天时总是收到警告。
我不明白为什么他会收到此警告,而known_host(警告消息中显示的路径)为空? (计算机重新启动)
为什么有时 shell 会要求他输入密码? (抱歉,我没有更多详细信息...)。从我的初始用户 session 开始,当我的 friend 连接到 ssh 应用程序时,从未询问过密码
当我们通过 ssh-kegen 删除主机时,我们忘记添加端口号。
所以,我的 friend 执行:
ssh-kegen -R [xxx.xxx.xxx.xxx]:yyyy
# xxx.xxx.xxx.xxx the ip of the server where is the ssh chat
# yyyy, le port number used by the application
这有效:)他可以毫无问题地连接到聊天室
我是一名优秀的程序员,十分优秀!