Operating System - HP-UX
1755991 Members
3324 Online
108839 Solutions
New Discussion юеВ

Re: ssh hang on pseudo terminal initialization

 
SOLVED
Go to solution
Brian Malone
Occasional Advisor

ssh hang on pseudo terminal initialization

Good day to all. Has anyone had any issues with OpenSSH on HP-UX B.11.11 and pseudo terminals? I have a box with 'OpenSSH_4.2p1-hpn' and 'OpenSSL 0.9.7i'. When I connect in using ssh, there is a long delay (5-20 seconds) before I actually get a pseudo terminal allocated (times depend on system activity). If I ssh from another box to run a command not using a pseudo terminal, there is no delay. I also have 2 other HP-UX servers with the same software version, but with fewer processors and less memory and I don't have the same issue on those. Any help on this is greatly appreciated. Thanks for your time.

Brian
11 REPLIES 11
Wouter Jagers
Honored Contributor

Re: ssh hang on pseudo terminal initialization

In my experience, such delays are usually caused by name resolution issues.

You could either make sure the server you're connecting to can resolve your client's address, or you can disable the use of dns by sshd through the config file.

Hope that helps,
Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Brian Malone
Occasional Advisor

Re: ssh hang on pseudo terminal initialization

Thanks for the fast response. I'm connecting just fine with no delay. It's just after successful authentication, it takes on average 15 seconds to actually get a working shell. It doesn't seem to matter if I use PubKey authentication or password. Once successfully authenticated, it's just a delay to get a prompt. Here's some verbose output from ssh:

Wouter Jagers
Honored Contributor

Re: ssh hang on pseudo terminal initialization

Yes, that's what I usually get when resolution is not ok: login, delay, shell.

If possible, could you try placing your client's name + IP address in /etc/hosts on the server and retry ? (that's usually how I check, minimal hassle)

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Brian Malone
Occasional Advisor

Re: ssh hang on pseudo terminal initialization

Thanks. I added the IP and hostname to /etc/hosts and it's set to check hosts first then dns. I still have the same behavior.

Thanks for the help. Appreciate your time.
Wouter Jagers
Honored Contributor

Re: ssh hang on pseudo terminal initialization

myes, and sorry. thought about it on the way home, the delay I was talking about did occur between username and pass prompt.

No more 'from experience' ideas, though.. does running ssh very verbose show anything ? Or perhaps you could fire up glance on the server end meanwhile, if it seems performance related.

Sorry again about the previous :)

Cheers
an engineer's aim in a discussion is not to persuade, but to clarify.
Dave Hutton
Honored Contributor
Solution

Re: ssh hang on pseudo terminal initialization

Which version of hpux version? 11.00 or older?

Two things I found.
If /var/adm/wtmp is huge it can take a while. You may try to zero it out.

Also from what I read 11.00 or older doesn't come with a random number generator?
If you do a search there are some suggestions on how to fix this.
Dave Hutton
Honored Contributor

Re: ssh hang on pseudo terminal initialization

Not sure how many times I re-read your message. I see you said 11.11.

Ignore my suggestions.
Court Campbell
Honored Contributor

Re: ssh hang on pseudo terminal initialization

You can try disabling the revere lookup by uncommenting the following line in sshd_config:

#UseDNS yes

and changing it to:

UseDNS no

Then restart the ssh daemon. Hope that helps. If not then at least you have eliminated that as the problem.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: ssh hang on pseudo terminal initialization

Also, tail -f the syslog.log file and try and connect. You should see the login attempts in that file. Maybe you'll find something interesting.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"