I have changed the file sshd_config under /etc/ssh/ directory. I have also changed the permission of files under /etc/ssh/ directory. Now when i am trying to execute
ssh username@remoteserverIP -vv
I am getting below logs.
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 *
debug2: resolving "server IP" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to server IP [server IP] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.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
我无权访问 root 用户。我也通过腻子尝试过。 Putty 给出以下错误。
服务器意外关闭网络连接
最佳答案
也许 /etc/hosts.deny
包含“ALL:
”或“ssh:
”条目,阻止您连接。
将“ssh: ALL
”或“ssh: x.x.x.x
”(用您的 IP 替换 x.x.x.x)添加到 /etc/hosts.allow
可以解决此问题。
关于linux - 无法通过 SSH 连接到远程服务器。错误: ssh_exchange_identification: read: Connection reset by peer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50617733/