参考下面2个链接解决了
是 /etc/ssh/sshd_config
配置文件不对引起的,从 /usr/share/openssh/sshd_config
复制默认配置文件并重启 sshd 即可解决。
升级过程中避免出现这个问题的方法:在出现下面的提示时
sshd_config: A new version (/tmp/filet2w1w4) of configuration file /etc/ssh/sshd_config is available, but the version installed currently has been locally modified.
选择
install the package maintainer's version
默认选中的是 keep the local version currently
可以通过下面2个命令看看是什么问题
sudo /usr/sbin/sshd -ddd
sudo /usr/sbin/sshd -T