When I am trying to login to a server using Putty ssh from my windows xp machine it is taking too much time for login.
My server name is http2 and when I enter this address into putty I immediately get
login as:
screen, but after I put my username root and enter the cursor moves downwards and wait for sometime(Around 20 seconds) before it displays
root@http2's password:
After I enter password it seems everything works fine and no problem running commands also.
I also encountered this problem with other usernames and only this server on this network have this type of problem. This server also don't have much processes running.
Does it go faster when you enter the IP instead of the name of the host when connecting?
Is the box you are trying to connect to very busy? Check with vmstat or top .
Is any other type of connect to the server fast ie. by it's name it sounds like being a webserver - is a http-connect fast? ftp?
Is it in the same subnet as your workstation you are trying to connect from?
Is a traceroute showing any delays?
This problem only exists when login to the server. But once logged into the system there is not problem for running tasks and commands and all are working fast.
Is this the case no matter from where you login? Do you have another box you could try to login from? If the problem persists, maybe restart the sshd. If this also does not help you could issue your ssh client with -v , -vv , or -vvv to get debugging output.
That solved the problem. I don't know what is the actual problem, but login from another PC works fine. But this problem only happens in this server only. Other servers can be login from my PC fast and without any delay.
Thank you for help. Please answer me if you know what is the problem with my PC and server.
Maybe update your sshd if it is an old version or downgrade if it only happens with a new version etc.
You could also compare /etc/ssh/sshd_config of this and a working server as a start.
Edit:
If you are using PAM, maybe some module takes some time. Check if your OS offers any tracing of this.
You can check the dns server entry in /etc/resolve.conf file . If the dns ip is not reachable then its getting delayed. If you are not using dns then just comment out the enrties in that file.