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.

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

Discussion in 'General Discussion' started by mahdy_sharifi, Jul 23, 2013.

  1. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,465
    Likes Received:
    927
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    key authorized ...
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,465
    Likes Received:
    927
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Two diffrenet Cpanel server , I want log to server 2 from server 1 .
    it can do over WHM but in SSH command line not !

    ssh root@IP
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,465
    Likes Received:
    927
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You will need to ensure that you call the SSH key directly. EX:

    Code:
    ssh -i /path/to/id_rsa root@server2.example123.com
    Also, make sure the authorized private key is imported to the server you are making the SSH connection from.

    Thank you.
     
  7. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    root@server4 [~/.ssh]# ssh -i /root/.ssh/server6 root@x.x.x.x
    Warning: Identity file /root/.ssh/server6 not accessible: No such file or directory.
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).



    root@server4 [~/.ssh]# ssh -i /root/.ssh/server6.pub root@x.x.x.x
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @ 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).
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,465
    Likes Received:
    927
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page