28 hours ago
I've just installed 12.04.2 server amd64 in VMWare Player and noticed that there is a 3-5 seconds delay after I put the password and before the shell appears. The same happens when I try to connect using some SFTP software.
In the logs it looks like:
Jun 26 22:40:01 ubuntu-1204-2-server-amd64 sshd: Accepted publickey for zerkms from 192.168.19.1 port 56018 ssh2
Jun 26 22:40:01 ubuntu-1204-2-server-amd64 sshd: pam_unix(sshd:session): session opened for user zerkms by (uid=0)
Jun 26 22:40:04 ubuntu-1204-2-server-amd64 sshd: subsystem request for sftp by user zerkms
Jun 26 22:40:04 ubuntu-1204-2-server-amd64 sshd: pam_unix(sshd:session): session closed for user zerkms
I've already added UseDNS no to /etc/ssh/sshd_config (and I didn't forget to restart ssh after that. I even reboot the whole server ;-)
Anything else I missed? Any ideas?
6 hours ago
start another sshd in debug mode (no need to stop the regular daemon) on a high port number for instance 2222 and connect to that server, you will see at what point the server is stopping. You can play with the debug level by adding more d's.
#/usr/sbin/sshd -dd -p 2222
Maybe sshd is not the problem but the login process.
Try to bypass all the profile scripting by directly starting a remote shell, see if it connects faster.
# ssh -t [email protected] /bin/bash
(option -t will gets you a tty so you bash will show a prompt and will have command line editing)
Session script should to be the cause as your logs shows the session is opened after