LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-05-2009, 08:34 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
SSH login takes 1-2 minutes


Hi.


At least one of my servers is hanging quite a bit when logging in (via SSH). After typing in a username and password, it takes 1-2 minutes before I'm logged in.

The server is a RHEL 5.1 box running on Vmware ESX.

I've noticed that running "hostname -s" takes approximately 5 seconds to complete. If this is a symptom of a DNS-problem than maybe this may explain why login takes so long. But I'm not quite sure where to begin debugging. Does anyone have a tip on what may be causing this?


Regards,
kenneho
 
Old 01-05-2009, 08:41 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can start by using the verbose option of ssh. Use one of the following
Code:
ssh -v user@host
ssh -vv user@host
ssh -vvv user@host
to get an increased level of debugging output. In this way you can see exactly where the ssh command hangs.
 
Old 01-05-2009, 08:44 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,146

Rep: Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048
Quote:
Originally Posted by kenneho View Post
Hi.
At least one of my servers is hanging quite a bit when logging in (via SSH). After typing in a username and password, it takes 1-2 minutes before I'm logged in.

The server is a RHEL 5.1 box running on Vmware ESX.

I've noticed that running "hostname -s" takes approximately 5 seconds to complete. If this is a symptom of a DNS-problem than maybe this may explain why login takes so long. But I'm not quite sure where to begin debugging. Does anyone have a tip on what may be causing this?
It does sound like a DNS issue. I'd check to make sure that the DNS servers you've got specified in /etc/resolv.conf are correct. Also, you might want to try to add your server (or make sure it's there), to the /etc/hosts file.

There are some gotchas with RHEL5 on VMware...time drift is one of them, and I know there's a patch specifically to address that on VMware, that you don't need for a 'real' server. Might want to call RedHat and see if there's something out there for it...
 
Old 01-05-2009, 09:21 AM   #4
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by TB0ne View Post
It does sound like a DNS issue. I'd check to make sure that the DNS servers you've got specified in /etc/resolv.conf are correct. Also, you might want to try to add your server (or make sure it's there), to the /etc/hosts file.

There are some gotchas with RHEL5 on VMware...time drift is one of them, and I know there's a patch specifically to address that on VMware, that you don't need for a 'real' server. Might want to call RedHat and see if there's something out there for it...
I think you're right: I've lost connection with one of the DNS-servers. After removing it from /etc/resolv.conf everything is back to normal. Thanks for your help (both you and colucix).
 
Old 01-05-2009, 09:40 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,146

Rep: Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048Reputation: 8048
Quote:
Originally Posted by kenneho View Post
I think you're right: I've lost connection with one of the DNS-servers. After removing it from /etc/resolv.conf everything is back to normal. Thanks for your help (both you and colucix).
No problem....glad to have helped.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH : Takes a long time to login to a remote server TomCruise2002 Linux - Networking 8 12-04-2011 01:01 PM
It takes almost 30 minutes for the icons and taskbars to load after login with Gnome anilbh Fedora 3 05-19-2008 08:39 PM
ssh login takes several minutes exodist *BSD 10 05-26-2005 03:17 PM
SSH takes a long time (2 minutes) to connect jinju Linux - Newbie 5 07-31-2004 10:37 PM
X login is slow, takes 2 minutes jhcatch22 Linux - Newbie 3 07-08-2004 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration