阿里云linux服务器登录失败,Connection closed
Posted 天宇星空
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了阿里云linux服务器登录失败,Connection closed相关的知识,希望对你有一定的参考价值。
ssh_exchange_identification: read: Connection reset by peer报错如下:
[[email protected]~]# ssh [email protected]。。 -p 2048 -v
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to 139.196.214.67 [139.196.214.67] port 2048.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
ssh_exchange_identification: read: Connection reset by peer
解决方法:去你需要ssh的那台机器吧ssh被连接的权限开启
[[email protected]]# vim /etc/hosts.allow
sshd:IP:allow
sshd:ALL(表示所有的IP)
[[email protected]]# service sshd restart
问题解决
以上是关于阿里云linux服务器登录失败,Connection closed的主要内容,如果未能解决你的问题,请参考以下文章
阿里云Linux服务器登录名ecs-user和root选择问题
阿里云服务器 ECS Linux 禁止IP 通过 SSH 登录