i have a small (4 seconds) login delay on my 18.04 ubuntu servers, that drives me crazy:
$ time ssh root@gateway exit
real 0m4,066s
user 0m0,015s
sys 0m0,005s
I've already checked the "usual" culprits: DNS, Avahi, pam_systemd.so, they aren't the cause. I've also shorten out /etc/profile, /etc/bash.bashrc, /root/.bashrc by putting a "exit 0" in the beginning of these files. It causes a little faster connect of 0m3,915s. So, they aren't the cause, either.
The ssh -vvv
shows, the whole time is lost after:
...
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
So, it seems not a problem with ssh itself. I'am guessing, there are running additional scripts on login that are stealing my time, but which are they and where they get triggerd?