1820643 Members
1881 Online
109626 Solutions
New Discussion юеВ

Re: SSH to server slow

 
SOLVED
Go to solution
Prashant Zanwar_4
Respected Contributor

SSH to server slow

Hi,
We have run ACL on the hosts, and after that ssh to host getting too slow.
Problem is weired, initial attempts are slow, like it stops for a while and later attempts become normal.
gateway/switch looks normal.
netstat also gets slow at showing ssh connections..all other things are normal.
Let me know where to look.. I checked / compared ssh config files with other hosts.. looks all normal..
Thnx
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
5 REPLIES 5
Vernon Brown_4
Trusted Contributor
Solution

Re: SSH to server slow

I had a similar problem; after ssh login it took about 10 seconds to get the prompt. Turned out to be reverse lookups. Fixed by changing the /etc/ssh/sshd.conf file. UseDNS off.

I don't remember the syntax exactly, but there's a commented entry in the conf file.
Al Licause
Trusted Contributor

Re: SSH to server slow

Please define slow....and expand a bit on which operations you are performing.

For example are you just doing interactive ssh keyboard to screen operations or are you using scp and/or sftp ?

Is it slow just during the login or do you see periodic delays after you have logged in and begun working ? If the later, it may not be an ssh issue but simply a network or system delay. Try tracing a session with tcpdump to see if you detect any delays and or retransmissions.

Andrew Cowan
Honored Contributor

Re: SSH to server slow

If it is only login that is slow, and you have checked the DNS settings, then it could be due to the encryption algorithm being used for the handshake. You can tune this in the "ssh_config" and "sshd_config" files.

If this is your problem it is normally caused by lack of CPU power or a missing OS patch.
Huc_1
Honored Contributor

Re: SSH to server slow

Check files /var/log/messages and /var/log/secure

Perhaps there are some info in dmesg ?

if this is not sufficient the try
# tcpdump
on the interface when you you invoke ssh ?

and maybe an ssh with option -v will reveal more.

Hope you find help in the above?

Jean-Pierre Huc
Smile I will feel the difference
Prashant Zanwar_4
Respected Contributor

Re: SSH to server slow

TURNED out a DNS issue, local dns server is not added to ACL list, which will be done in a bit. I changed resolv.conf after looking in tcpdump a bit. Query is going to remote DNS after ssh connections happens for reverse lookup for gethostbyname..
Thanks for all responses.
Rgds
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."