Very slow ssh logins on Fedora 22
I’ve recently set up a Fedora 22 firewall/router at home (more on that later) and I noticed that remote ssh logins were extremely slow. In addition, sudo commands seemed to stall out for the same amount of time (about 25-30 seconds).
I’ve done all the basic troubleshooting already:
- Switch to
- Tested DNS resolution
These lines kept cropping up in my system journal when I tried to access the server using ssh:
dbus: [system] Failed to activate service 'org.freedesktop.login1': timed out sshd: pam_systemd(sshd:session): Failed to create session: Activation of org.freedesktop.login1 timed out sshd: pam_systemd(sshd:session): Failed to create session: Activation of org.freedesktop.login1 timed out
The process list on the server looked fine. I could see
systemd-logind processes and they were in good states. However, it looked like
dbus-daemon had restarted at some point and
systemd-logind had not been restarted since then. I crossed my fingers and bounced
systemctl restart systemd-logind
Success! Logins via ssh and escalations with sudo worked instantly.