When logging in to an up to date Debian 12 (bookworm) server via ssh (to IP address) the login is delayed by ~10 seconds after entering the password (and also when doing ssh login via key).
Here is the log (journalctl -u ssh
) of the server:
Dec 08 15:30:00 axx-phon-help01 sshd[2935]: Accepted password for xxx from x.x.x.x port 42038 ssh2
Dec 08 15:30:00 axx-phon-help01 sshd[2935]: pam_unix(sshd:session): session opened for user xxx(uid=1000) by (uid=0)
Dec 08 15:30:25 xxx-xxx sshd[2935]: pam_systemd(sshd:session): Failed to create session: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
I have already tried disabling sshguard
and nftables
and restart the server.
I also solved this problem.
Other (Debian 12) Servers in the same subnet do not have that problem.
systemctl mask systemd-logind && pam-auth-update
solved it - but I did not not know why other servers (LXC containers) are not affected.