I'm running a server at home with Ubuntu 14.04. I have two users on the machine, say user1 and user2, each able to ssh into the box. While user1 logs in very quickly, user2 takes about 20 seconds to log in. Logging in as user2 with ssh -v shows that the main pause happens after this message:

debug1: Sending environment.

The .bashrc files for the two users are identical. (A diff on them produces no output.) On the server, there is a line in /etc/ssh/sshd_config with AllowUsers user1 user2. That same file has UseDNS no in it already.

This issue started only about a week ago; I've had no such issues for the previous couple of years that I've been running the machine.

Where should I look to find the root cause of the delay for the log in for user2?

UPDATE: On a whim, I created a new user, user3, gave that user ssh access by editing sshd_config, and log in for the new user is fast. So it really seems to be something about the way user2 is configured. But what?

  • One of them root? – Erkin Alp Güney Jun 19 '16 at 20:20
  • Neither is root, but both are in the sudo group. – wckronholm Jun 19 '16 at 20:26
  • That does not matter. However, root has less checks in system call codepaths, therefore, non-root user may be slower. – Erkin Alp Güney Jun 21 '16 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.