Operating System - HP-UX
1825789 Members
2078 Online
109687 Solutions
New Discussion

SSH authentication is slow

 
SOLVED
Go to solution
Alex Fedyashov
Occasional Advisor

SSH authentication is slow

It takes a few seconds for ssh to autheticate the user. WHat could be slowing it down?
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: SSH authentication is slow

One of the most common reasons is that the box lacks a /dev/random device so if this is 11.11, check to see if the strong random number package is installed. If this is above 11.11 then you should already have a device. If it's 11.0 then get used to the delay.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: SSH authentication is slow

SSH needs to create a highly random number as part of the authentication process. In old versions of HP-UX (11.00 and earlier), this is accomplished using a number of system-unique numbers which requires some significant time to gather.


Bill Hassell, sysadmin
Alex Fedyashov
Occasional Advisor

Re: SSH authentication is slow

Thanks for the help.
isaac_loven
Frequent Advisor

Re: SSH authentication is slow

Ideally to make ssh faster, you should install the random number generator into the kernel.
But on a production system this change may be painfull. So we updated the
/opt/ssh/etc/ssh_prng_cmds file. The ssh performance increased by about 70% : form 5 to 1.7 seconds ( system load decreased by 80% ). Enclosed is the file.

results
# time ssh p0 exit
real 5.7
user 1.1
sys 2.3
# time ssh p0 exit
real 5.0
user 1.1
sys 2.4
# cd /opt/ssh/etc
# cp -p ssh_prng_cmds.fix ssh_prng_cmds
# time ssh p0 exit
real 1.7
user 0.5
sys 0.5
# time ssh p0 exit
real 1.7
user 0.5
sys 0.5
isaac_loven
Frequent Advisor

Re: SSH authentication is slow

ssh_prng_cmds fix enclosed now. Isaac