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 login via Keys

Discussion in 'General Discussion' started by TheGlenn88, Nov 9, 2013.

  1. TheGlenn88

    TheGlenn88 Registered

    Joined:
    Nov 9, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I have been trialling cPanel so far with success, one thing that i cannot for the life of me do is login to SSH using keys. Not only in cPanel i have never been able to do it via VPN in my router configuration. I have spent alot of time trying to do it but with no success.

    I am using the latest cPanel 11.40.0 b19 (on a cloudlinux VM locally) and i am running os x 10.9 mavericks and using the terminal ssh client. Root user login is disabled, password auth is disabled, created a new user and included in wheel group.

    I have tried:
    Generating the key from WHM and importing it into my ~/.ssh folder and creating a config file inside with the host and username.

    and
    Generating the key from osx and importing the public key into WHM and authorising.

    either way i just get the error "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."

    I have tried using

    ssh <user>@host
    ssh -i ~./ssh/id_rsa <user>@host
    ssh -i ~./ssh/id_rsa host
    ssh -i ~./ssh/private.key <user>@host (when imported from WHM)
    ssh -i ~./ssh/private.key host (when imported from WHM)

    Any help will be greatly appreciated.

    Kind Regards
    Mike
     
  2. TheGlenn88

    TheGlenn88 Registered

    Joined:
    Nov 9, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I managed to get this problem resolved.

    Where i was going wrong was that i had created a new user and added it to wheel because root login is disabled. I was logged in to WHM as root and generating/importing the keys using the panel. which was creating keys for the user root instead of my newly created user...

    so i logged in via ssh using password created the keys using "ssh-keygen -t dsa" then imported to my laptop.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page