Operating System - HP-UX
1752579 Members
3010 Online
108788 Solutions
New Discussion юеВ

Re: ssh pseudo-terminal allocation

 
SOLVED
Go to solution
Fred Ruffet
Honored Contributor

ssh pseudo-terminal allocation

Hi all,

I have ssh connexion issues on a HP-UX 11iv3 server. When connecting to this server, I have huge delays after password validation. I've verified and setup DNS correctly. But from anywhere, even from the server itself an ssh connection to this server takes lots of time. Once connected, usage is at normal speed. I've noticed that when I don't allocate a pseudo terminal (for instance by submiting command on ssh command line) connexion is not slow. So... where does this strange issue comes from ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
6 REPLIES 6
Tim Nelson
Honored Contributor
Solution

Re: ssh pseudo-terminal allocation

check out /opt/ssh/etc/ssh_prng_cmds

do some timex on each command and/or write a script to process them.

I typically see the last command slowing things down due to a large /var/adm/wtmp* files.

or just clean out your wtmp and login again to see if that is the issue.

Steven Schweda
Honored Contributor

Re: ssh pseudo-terminal allocation

> [...] I've verified and setup DNS
> correctly. [...]

Your opinion, while interesting, has a value
which is uncertain, because only you know how
you set up and/or verified anything. Many
people who have the usual DNS problem make
the same claim, and they're wrong.

A Forum search for, say,
slow ssh
or
slow telnet
(or similar) should find many old threads
which would illustrate this.

However, if you can get a prompt result from
a command like the following, when it's run
on the server, then you may be right, and the
problem may lie elsewhere.

nslookup

But trusting the opinions of people who ask
questions here, and who offer no evidence to
support those opinions, is often a mistake.
Fred Ruffet
Honored Contributor

Re: ssh pseudo-terminal allocation

Steven,

You're right that I haven't been precise enough. I've been solving this exact problem of DNS with many people telling me it was configured.

I have nslookup working on both servers for resolution and reverse. It wasn't the case when I got on that case, but now it works. But ssh is still slow and that's why I came here. I'm truly sorry I haven't been more explicit about that.

Problem with forums (or support in general) is always that you don't exactly know what level of knowledge others have and what they really have done.

I will try Tim's proposition which seems particularly interesting and I'll give feed back.

Regards,

Fred

--

"Reality is just a point of view." (P. K. D.)
Fred Ruffet
Honored Contributor

Re: ssh pseudo-terminal allocation

So many thanks Tim :)

"last" is part of the commands. "timex last" returns
real 5:55.78
user 3.58
sys 8.49
and "du -k /var/adm/wtmps"
706728 /var/adm/wtmps

I have trimed /var/adm/wtmps and now connection has no delay.

Thanks again,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fred Ruffet
Honored Contributor

Re: ssh pseudo-terminal allocation

Problem is solved by trimming /var/tmp/wtmps. This has been done this way :

/usr/lib/acct/fwtmp -X /var/adm/wtmps.20110324
tail -100 /var/adm/wtmps.20110324 > /var/adm/wtmps.20110324.new
/usr/lib/acct/fwtmp -icX < /var/adm/wtmps.20110324.new > /var/adm/wtmps
gzip -9 /var/adm/wtmps.20110324
rm /var/adm/wtmps.20110324.new

Thanks again to Tim

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Tim Nelson
Honored Contributor

Re: ssh pseudo-terminal allocation

Fred,

you could also comment out that line in the prng file.. or change it to last -100 or something to keep it from happening again down the road.

i believe this is used for encryption entropy, to simply generate cpu randomness.

there are probably better ways but sometimes it is not worth the extra effort.

glad I could help.