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

mahdy_sharifi

Well-Known Member
Feb 26, 2012
214
1
68
cPanel Access Level
Root Administrator
Hello :

I setup SSH key between 2 Cpanel server and can log between them with SSH pass through WHM .
But When I connect to server over SSH command line following error occur :

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

I google this problem too many question about this problem but not any right answer .

anybody know how can resolve ?

THanks
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

Are you attempting to access SSH via a password or a SSH key? If with a key, check that the key is authorized via:

"WHM Home » Security Center » Manage root’s SSH Keys"

Thank you.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
What command are you using for SSH access? Are you using a specific SSH client, and are you attempting to make the connection from your desktop or another server?

Thank you.
 

mahdy_sharifi

Well-Known Member
Feb 26, 2012
214
1
68
cPanel Access Level
Root Administrator
[email protected] [~/.ssh]# ssh -i /root/.ssh/server6 [email protected]
Warning: Identity file /root/.ssh/server6 not accessible: No such file or directory.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).



[email protected] [~/.ssh]# ssh -i /root/.ssh/server6.pub [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/server6.pub' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/server6.pub
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Private key files should have 0600 permissions, whereas public key files can have 0644 permissions. Please ensure you have authorized the public key file on the destination server that you are attempting to access via SSH.

Thank you.