阿里云上其他服务器上通过ssh root@120.24.216.196均正常,
在公司机器上通过ssh root@120.24.216.196,出现以下错误:
OpenSSH_7.3p1, LibreSSL 2.4.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to 120.24.216.196 [120.24.216.196] port 22.
debug1: Connection established.
debug1: identity file /Users/mechanic/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/mechanic/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
ssh_exchange_identification: read: Connection reset by peer
用阿里云其他服务器 telnet 120.24.216.196 22 正常
用公司服务器 telnet 120.24.216.196 22 不通
设法清除公司服务器上关于该被连接服务器的密钥信息,如果你没有办法,我推荐一个简单粗暴的办法,就是删除公司服务器上的主文件夹下的名为 .ssh 的隐藏文件夹,注意文件夹名是以点开头。当然你删除之前最好还是问问公司的其他人有没有人在这文件夹.ssh里放什么重要的东西。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。