slow SSH

Go to solution
Super Advisor

slow SSH

I installed new version OpenSSH 5.5 on hp-ux 11.23.

When I ssh to that machine with new SSH version, it takes about 10-12 seconds to get there. Much slower.

Telnet is fine, there are no DNS issues as far as I can tell.

I have other machines with identical sshd_config file that do not have that issue.

Any idea what's going on?
Steven E. Protter
Exalted Contributor

Re: slow SSH


If the only change factor is openssh, then bad software is the likely cause.

Did you get openssh from where it is named secure shell? If yes, report the problem and wait for a new version.

Steven E Protter
Owner of ISN Corporation
Bill Hassell
Honored Contributor

Re: slow SSH

There are two areas where ssh can slow down. The first is the remote server. It must do a lot of computing so if it is a very slow D350 or K320, then the random number computation will be very slow -- all connections to these machines will appear to be slow to start.

The second is address resolution and DNS is very often the culprit. nslookup is not enough. Like telnet and rlogin, the ssh code will try to validate the hostname *and* the IP address. This means that the DNS server must store both records. But when the DNS server is managed by Windows admins, they often fail to add the reverse lookup records.

For servers, I never rely on DNS as the first authority. Use /etc/hosts first, then DNS and don't search unavailable services such as NIS or LDAP. Do this by editing the lines in /etc/nsswitch.conf:

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes: files [NOTFOUND=continue UNAVAIL=continue] dns

Now populate /etc/hosts with the servers you'll be contacting along with PCs and MACs that connect often.

Also check DNS with nsquery rather than nslookup:

nsquery hosts
nsquery hosts

Bill Hassell, sysadmin
Trusted Contributor

Re: slow SSH

pls check the size of /var/adm/wtmps file.

have you restarted the sshd services after upgrade ?