The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

slow SSH login

Discussion in 'General Discussion' started by DigiCrime, Aug 23, 2005.

  1. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    What would cause a slow SSH login...

    Keep all these in mind.
    /etc/resolv.conf shows correct info
    Top reports 110-130 processes with load below 1 uptime 12 days
    Very little network activity
    smartctl shows no errors for the drive

    mysqladmin status
    Uptime: 72980 Threads: 4 Questions: 749611 Slow queries: 6 Opens: 507 Flush tables: 1 Open tables: 491 Queries per second avg: 10.271

    Running a device read check

    Timing buffered disk reads: 64 MB in 5.28 seconds = 12.12 MB/sec

    Cache
    Timing buffer-cache reads: 128 MB in 0.39 seconds =328.21 MB/se

    Think the drive is going bad, what other checks could I look into ?
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Are you sure that it is an issue with the system. Did you try a traceroute to the server.
    I mean just to make sure that this is not a network issue
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Indeed. The most common cause of slow SSH that I experience is due to packet loss getting to a server.
     
  4. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    Yep....16ms avg route time
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Is it just the login that is slow, or while you're also working in SSH?

    If it's just the login, you could do the following:

    1. Open 2 SSH windows and login with one of them

    2. In the one you have logged in with, stop the sshd daemon (you should not be logged out - you can always restart it through WHM):

    service sshd stop

    3. Run up the ssh daemon in debug mode:

    sshd -d -d -D

    4. Login with the second window

    5. Monitor the daemon window and see if it appears to hang anywhere during the login process. Bear in mind that it will be slower anyway as you're running the daemon in debug

    6. When you've logged in and you then logout the daemon in the first window should terminate

    7. Restart the sshd daemon in the first window:

    service sshd start
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    One more thought. If your SSH client allows for multiple authentication methods and you are, for example, logging on with password authentication, make sure that that is the first method that your client uses rather than, for example, key authentication.
     
  7. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    SSH2 is what its set to I believe I use a key to log in, conventional SSH logging (asking for user and password) results in about the same amount of time to log in..

    It might be just me but trying it from a server outside the network or inside the network has same results :eek: baffled a little
     
Loading...

Share This Page