SSH login to a server yesterday, but SSH login is slow, almost half a minute to log in successfully, so it is tracked check
①, ssh ip-vvv, or ssh ip-v
Used to check where SSH is the longest
Then we find that the longest wait time after entering interactive session statement, more than 20 seconds, indicates the problem of password authentication during non-SSH login.
②, this can not see what the problem, so use Starce to track
Starce-o ~/starce_ssh.txt-t SSH IP
Cat ~/starce_ssh.txt found:
Clock_gettime (0x7/* clock_??? */, {5243451, 134078578}) = 0 <0.000026>
Select (7, [3], [], NULL, NULL) = 1 (in [3]) <25.026978>
But I can't read this place, and I'm sad.
③, so try to check the messages log of the server logged in, there is a significant discovery
DBUS[7782]: [System] Failed to activate service ' org.freedesktop.login1 ': Timed out
DBUS-DAEMON:DBUS[7782]: [System] Failed to activate service ' org.freedesktop.login1 ': Timed out
Show that the service timed out, the Internet to find information, the main effect is as follows:
Dbus Service restart, Systemd-logind service does not restart, you can view the status of Systemctl status Systemd-logind, the workaround is to restart the service Systemctl restart Systemd-logind
Reference Document: Http://serverfault.com/questions/707377/slow-ssh-login-activation-of-org-freedesktop-login1-timed-out
An SSH login slow problem tracking record