Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Long ssh login times

alont
Occasional Visitor

Long ssh login times

Hello everyone, we have a problem with one of our servers running HP-UX 11.31.

 

When trying to login to the server via ssh, after entering the password as prompted, there is a 10-15 second delay beofre the login process finishes.

 

I've tried checking if this is DNS related and changing the config file with little effect.

I've tried connecting to the server with ssh -vvv but nothing out of the ordinery was found.

If I try to login to the user locally, it's almost instant. If I try to login to a different user using ssh, I get the same problem.

oddly enough, I've tried running a command through ssh (for example, 'ssh <user>@<server>  "ls -l"') and the output was returned instantly with no delay.

Also, trying to connect to the server using a different shell (e.g 'ssh <user>@<server> "/bin/ksh"') is also instant. This led me to believe there was a problem with the shell startup script but I've found nothing out of the ordinary in it, and like I already mentioned, a local login is instant.

 

Do you have any further ideas or suggestions? Any help would be much appreciated.

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > Networking. - Hp Forum Moderator

5 REPLIES
Steven Schweda
Honored Contributor

Re: Long ssh login times

> I've tried checking if this is DNS related and changing the config
> file with little effect.

   That's nice, but with my weak psychic powers, I don't know what you
checked or changed.  (How little is "little"?)

> I've tried connecting to the server with ssh -vvv but nothing out of
> the ordinery was found.

   Similarly, I don't know what you might consider ordinary.

> [...] a different user [...]
> [...] a different shell [...]

   I can't tell how many things you're changing when.  Generally, if
there's a difference between local and remote, it suggests DNS.

   As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations.  Hiding
significant details risks loss of useful information.


   Before you posted this question, did you do a Forum search for
keywords like, say:
      slow ssh
?  That should lead to a description of a specific DNS problem, and a
specific test to determine if that's the problem in your case.  It
should also lead to information on a popular non-DNS problem.

alont
Occasional Visitor

Re: Long ssh login times

I apologize if my post was too vague, I'll try to be more straight forward with my posts in the future.

I've tried adding:

UseDNS no
GSSAPIAuthentication no
to the ssh_config file and so no change in remote login time whatsoever.

 

When I compare the output of ssh -vvv to the problematic server compared to the output I get when connecting to other servers, I saw no difference. Regardless, I'll post the exact output tomorrow when I get back to the office.

 

 

To clarify what I posted regarding different shells and users, here is each action and its result:

Remote ssh login to user A - > 10-15 sec login time after entering password

Local login to user A- > 10-15 sec login time after entering password

Local login to user B-> 10-15 sec login time after entering password

Remote login using command 'ssh A@<server> "/bin/ksh"' -> near instant login

Running a remote command using ssh (like 'ssh A@<server>  "ls -l"') -> instant output

 

Again, thanks for your help and thanks 

chindi
Respected Contributor

Re: Long ssh login times

Hi,

 

Check your /var/adm/wtmps & btmps files .

Their size might have been increased , is it an FTP server ??

 

You can trim these files .

Dennis Handly
Acclaimed Contributor

Re: Long ssh login times

>You can trim these files .

 

Since these are binary, trimming would require converting to ascii, trim, then back.

sapoguheman
Frequent Advisor

Re: Long ssh login times

Also try to check the performance of your server after you login, If it is normal or not.