1

I have a hardware which is flashed with the following operating system : Linux colibri 2.6.26-colibri_pxa3xx #14 I have noticed that the ssh login as well as telnet takes too long, even though I try to login from the same subnet.

I do not see any unusual messages being logged in the /var/log/messages

I tried ssh -vvv and I can see that the delay is mainly due to the fetch in the remote protocol version. I have 2 identical machines flashed with the same OS and the behaviour occurs in one and not the other. The lag i see is a considerable delay in fetching and displaying this message.

debug1: Remote protocol version 2.0, remote software version dropbear_0.49
3
  • 2
    Use ssh -vvv to see where does it hang? Have you tried to disable DNS Reverse lookup on the server?
    – quanta
    Sep 26 '12 at 4:09
  • Is your ssh authenticating to ldap? Possibly the LDAP is the hangup.
    – Robert
    Sep 26 '12 at 5:04
  • Maybe check this post out, he uses strace to look into a slow ssh connection. Might be able to follow steps and see where its coming from depesz.com/2010/12/13/a-tale-of-slow-ssh-connections
    – Robert
    Sep 26 '12 at 5:10
2

First, to collect more info about the delay try connecting with verbosity enabled: ssh -vvv user@hostname. Second, try disabling the reverse DNS lookup - edit /etc/ssh/sshd_config on your device and setup UseDNS no. Restart the service and check again. Third, setup GSSAPIAuthentication no in the same file, restart the service and retry.

Here you can see a good example, I used it in the past.

1
  • Thanks! I had to set UseDSN no and GSSAPIAuthentication no, then I restarted the sshd service with sudo service ssh restart and the next time I connected it was instantaneous!
    – user
    Sep 18 '18 at 19:43
2

Try putting UseDNS no in /etc/ssh/sshd_config and restart ssh. You may also want to add an entry to /etc/hosts for the machine you are trying ssh into.

1

I had a similar issue connecting to my DC. Try to alter the MTU settings of the sshd server to a value less than 1500. Worked for me.

0

Had similar problem: the SSH connection took 22 seconds with authorization key. Used ssh -vvv user@remote_host to see this message:

debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information

Then this link showed: "add host to /etc/hosts file." So I added the remote_host on client's /etc/hosts. Now the SSH connection takes less than second.

1
  • This does not match the information in the original question. If the error you encountered is not part of anything existing, this may be posted as a new question. You can also answer it yourself just to provide the information. Nov 20 '17 at 18:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.