我有一台运行 Debian 和 sshd 的服务器,如果我需要重新启动服务器,我的 SSH 会话会在客户端挂起,直到 TCP 超时。我认为这是因为在sshd终止时它没有明确关闭与主机的打开的 SSH 会话。我应该怎么做才能让sshd所有人先断开连接,然后正常终止?到目前为止,我没有看到man sshd_config与关闭行为相关的参数。
我在我的 Linux 机器上收到以下错误消息。
sshd[9287]: message repeated 2 times: [ error: PAM: Authentication failure for root from 172.16.2.1]
sshd[9287]: Received disconnect from 172.16.2.1: 11: [preauth]
sshd[9312]: error: PAM: Authentication failure for root from 172.16.2.1
sshd[9315]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=172.16.2.1 user=root
Run Code Online (Sandbox Code Playgroud)
这种情况经常发生,我的日志中充满了此错误消息。如何克服这个问题?