Ubuntu 16.04 中无法 ssh

Ubuntu 16.04 中无法 ssh

我有:

PC A(Ubuntu 14.04)

PC B(Ubuntu 16.04)

服务器 S1 (CentOS)

服务器 S2(未知)

阶段:

从计算机 A ssh my_user@S1 -----> 确定

从计算机 B ssh my_user@S1 -----> 确定

从计算机 A ssh my_user@S2 -----> 确定

从计算机 B ssh my_user@S2 -----> 失败

这是错误详细信息:

ssh myuser@S2_address -v
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to S2_address [S2_address] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vinhphat/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
ssh_exchange_identification: read: Connection reset by peer

当我升级到 Ubuntu 16.04 时出现了这个问题。

答案1

我遇到了这个问题,因为我的/etc/ssh/sshd_config文件是空白的。

我重新安装了 ssh 软件包并且它对我有用:

sudo apt-get purge openssh*
sudo apt get install openssh-server

相关内容