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.

SSH takes 10+ seconds to log user in

Discussion in 'General Discussion' started by n000b, Aug 23, 2007.

  1. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I've got an unusual problem and I'm wondering if anyone can help me troubleshoot it.

    Whenever I log in to SSH on my server, once I have entered in my username and password it takes about 10 seconds before actually logging me in (if I enter the incorrect password it tells me within 1 or 2 seconds). I've got no idea why it takes so long and I'm trying to find out.

    I just restarted my server then and noticed that it logged me in straight away - so I'm guessing that the longer the server has been up for, the longer it takes to log me in for whatever reason.

    The problem seems to occur regardless of what user I try to log in to.


    Has anyone ever encountered this problem before? Does anyone know what actual steps the SSH process takes (ie what files it checks/executes etc) when a user tries to log in so that I can try to troubleshoot the problem?

    Thanks :)
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    If you are using any SSH client then see if it provides any debug option or not. If you are on linux and using the SSH directly then you can debug it as:

     
  3. tweakservers

    tweakservers Well-Known Member

    Joined:
    Mar 30, 2006
    Messages:
    379
    Likes Received:
    0
    Trophy Points:
    16
    check and see if you have UseDNS set to yes in your ssh configuration at /etc/ssh/sshd_config. If you have this, it will try to resolve your client's SSH DNS hostname during the authentication.
     
  4. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Between asking for the password and actually completing the login process, it said this:

    I'm not sure if there is anything abnormal in there, but it isn't taking a long time to log in yet anyway so there probably wouldn't be.


    It's commented out; is the default value for it yes or no?
     
  5. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    cPanel Access Level:
    Root Administrator
    Default is set to yes. Set it to no and restart sshd.
     
  6. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. I will try it later and report back here in a few days. It doesn't really make sense that it would suddenly be resolving quickly after a restart would it though?
     
  7. jandafields

    jandafields Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    426
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    You didn't actually need to reboot, just restart named/bind. If that is not runnning correctly, it can't resolve.
     
Loading...

Share This Page