SSH login via Keys
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 @host
ssh -i ~./ssh/id_rsa @host
ssh -i ~./ssh/id_rsa host
ssh -i ~./ssh/private.key @host (when imported from WHM)
ssh -i ~./ssh/private.key host (when imported from WHM)
Any help will be greatly appreciated.
Kind Regards
Mike
-
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. 0 -
Hello :) I am happy to hear you were able to resolve the issue. Thank you for sharing the solution with us. 0
Please sign in to leave a comment.
Comments
2 comments