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 logins fail

Discussion in 'Security' started by LasseTK, Aug 12, 2010.

  1. LasseTK

    LasseTK Active Member

    Joined:
    Apr 15, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    I am no longer able to connect to my server using SSH. I am using password authentication and it has worked before.

    I have checked my Host Access Control List and restartet SSH. Since that did not help I went down to the server and took a look at the sshd config files. I deleted the ssh config and created a default config. Then restartet SSH, but still no connection. Here is what happens.

    Code:
    $ ssh root@xxx.xxx.xxx.xxx
    root@xxx.xxx.xxx.xxx's password: 
    Connection closed by xxx.xxx.xxx.xxx
    The weird thing (I think) is that it asks for my password instead of simply refusing the connection which is why I thought it had something to do with the sshd config files. I have also tried to give shell access to another user with the same result. I have tried connection from both OS X and Windows machines - no difference :confused:

    I am running cPanel 11.25.0-R46156 - WHM 11.25.0 - X 3.9 on CENTOS 5.5 x86_64
     
    #1 LasseTK, Aug 12, 2010
    Last edited: Aug 12, 2010
  2. whr

    whr Active Member

    Joined:
    Jul 25, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Did you check both the ACL files (/etc/hosts.deny and /etc/hosts.allow)?

    Also try disabling the server's firewall (your ip might be blocked).

    P.S: If your DC allows KVM, login via KVM over IP to check the ACLs and firewall settings.
     
  3. LasseTK

    LasseTK Active Member

    Joined:
    Apr 15, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the reply.

    I solved the problem by adding a key through WHM and then logged on using the key instead of the normal password auth. For some reason this worked. I have now disabled password auth (as it wasn't working anyway) and will just use the key in the future.

    If anybody has the same problem, one tech expert adviced me to add
    Code:
    UseLogin Yes
    
    to my sshd_config. I haven't tested it since I am satisfied with just using a key instead :)
     
Loading...

Share This Page