SSH - public key- cpanel - Ubuntu

dramos

Registered
Jun 18, 2010
4
0
51
Hello:

I have tried to make ssh work with public keys for some time now but i just can't. I try to follow all the tutorial out there but it just doesnt work.

Im trying to set this up so i can ssh to root in my server with cpanel. i have tried creating the keys in cpanel authorizing then copying to my local computer. i also tried generating the keys in my local computer then importing in cpanel.

Any advise will be appreciated.

Thanks in advance.

This is what i get when i ssh verbose

Permission denied (publickey,gssapi-with-mic).
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
I assume you have ran ssh-keygen -t dsa & generated the keys


copy the id_dsa.pub from your Ubuntu server to

authorized_keys file of your cpanel server

you may have to authorize them in WHM "Manage SSH Keys"
 

dramos

Registered
Jun 18, 2010
4
0
51
I got this to work for account in cpanel but not for the root. i know i can't logint to the root so i have to logint to the main account and the su - but publick key does not work for the root or the main account.

when i create a key pair the last part says = [email protected] but since root login is not allowed i change it to [email protected] and then try to use but i get the following error

Enter passphrase for key 'id_dsa':
debug1: read PEM private key done: type DSA
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password: