cancel
Showing results for 
Search instead for 
Did you mean: 

ssh started haning

SOLVED
Go to solution
Danny Petterson - DK
Trusted Contributor

ssh started haning

Hi Gurus!

Have a few 11.31-boxes, which usually does not have any problems. However, lately, when you ssh to them using putty or HP-UX ssh-client, the login hangs for about 10 secs, after you have typed your password.

debug:

sshd - server:
debug3: session_unused: session id 0 unused
debug1: session_new: session 0
...hanging here for about 10 secs.....
debug3: mm_request_send entering: type 26
debug3: mm_answer_pty: tty /dev/pts/5 ptyfd 6

ssh - client:
debug2: shell request accepted on channel 0
....hanging here for about 10 secs, the login on..

Any ideas?

Thanks in advance.
5 REPLIES
Danny Petterson - DK
Trusted Contributor

Re: ssh started haning

More info:

The machines having the problem, has recently been updated to 11.31 1003, with a new version of ssh:

SecureShell A.05.30.009 HP-UX Secure Shell

The once we have, without any problems, are running

SecureShell A.04.50.011 HP-UX Secure Shell

...what would the difference be?

Again, thanks for any ideas.
singh sanjeev
Trusted Contributor
Solution

Re: ssh started haning

check wtmp/btmp file may have grown large, try to housekeep it.
Sanjeev Singh
Danny Petterson - DK
Trusted Contributor

Re: ssh started haning

ARGH - you are right, I don't know why I did not think of that. /var/adm/wtmps was to big, cat /dev/null > /var/adm/wtmps solved the problem.

Thanks a lot!!
Danny Petterson - DK
Trusted Contributor

Re: ssh started haning

Ups - forgot to chose "Close"....
Mounaam
Trusted Contributor

Re: ssh started haning

Hi,

sshd will fork a command from /etc/opt/sshd/ssh_prng_cmds to get some random data.

Search for a command listed in this file that could takes few seconds when executed.

The command that usually takes times is "last ..." when you have a huge /var/adm/wtmp file.

You can comment "last ..." commands in ssh_prng_cmds file or purge regularly wtmp file.

Regards,
Mounaam