SSH connection error – Permission denied cPanel server

ssh permission denied error, that what we are discussing here. The word SSH is the abbreviation for Secured Shell. SSH is a command-line program to login to remote Linux server which has SSH server.

The SSH is using for remote administration via server command line as root or any other user on that server who has ability to access the web-server via shell.

Error:

SSH connection error – Permission denied (publickey,gssapi-keyex,gssapi-with-mic) cPanel server

SSH (Secured Shell) is cryptographic protocol for remote server administration, data communication, remote command execution, and other secure network services between two networked computers. To connect machines by using SSH, the remote side must have a SSH server and also the client side must have SSH client to be installed.

30 plus SSH interview questions and answers – compiled

SSH, secure shell, is a network protocol used to access remote Linux machine. You can execute commands on the remote server by connecting using SSH protocol. SSH, it’s an important part in a Linux based technical interview. Both newbies and experienced techs can follow up this post for their interviews!

It is very vast and interesting topic. Prepare SSH clearly and attend the interview with cent percent confident.

In some strange situations, you may have trouble with SSH connection. If you are facing this error while accessing the server via SSH, here is the solution.

ssh permission denied error, Error details

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

Reason:

The password authentication was disabled on sshd_config file:

You can simply overcome this from your WHM control panel. Access your WHM control panel and do follow the steps below to overcome the SSH error.

ssh permission denied error

Step I : Login to WHM
Step II : Go to,

WHM >> Security Center »SSH Password Authorization Tweak 
ssh permission denied error
ssh permission denied error

Then, enable the Password Auth. If it is already enabled, you may re-enable it to resolve the error.

Step III : Restart the sshd service.

That’s it 🙂

Related posts:
1, Important cPanel service’s configuration file, path, service name, port – Command line view
2, How to change cpanel port through command line
3, How to enable Varnish in cPanel server
4, How to check the version of your WHM/cPanel from command line ?

Post navigation

Arunlal Ashok

Linux Systems Architect at Endurance International Group. I know her (Linux) since many years. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team CryBit.com

8 thoughts on “SSH connection error – Permission denied cPanel server

  1. Hi Arun,

    I am receiving ‘permission denied (publickey gssapi-keyex gssapi-with-mic)’ issue. Would you be able to help me with resolving this issue please?

    Steps followed:
    as abc user issued ssh-keygen -t rsa -P “”
    from home directory as abc user, issued ‘cat /home/abc/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys’ command
    from server6, issued ‘ssh-copy-id -i /home/abc/.ssh/id_rsa.pub [email protected]’ (abc01-01 is hostname) to copy the ssh public key
    Received ‘permission denied (publickey gssapi-keyex gssapi-with-mic)’ issue
    Steps followed to resolve permission denied error:
    mkdir /etc/ssh/
    cp /home/abc/.ssh/authorized_keys /etc/ssh/
    chown -R abc:abc /etc/ssh/
    chmod 755 /etc/ssh/<HOSTNAME?
    chmod 644 /etc/ssh//authorized_keys
    In /etc/ssh/sshd_config file ->
    ‘PubkeyAuthentication’ set to yes
    Uncomment ‘RSAAuthentication yes’
    Uncomment ‘AuthorizedKeysFile .ssh/authorized_keys’
    Uncomment ‘PasswordAuthentication yes’
    Uncomment ‘PasswordAuthentication yes’ (looks like two lines are same in this file)
    Uncomment ‘ChallengeResponseAuthentication no’
    Uncomment ‘ChallengeResponseAuthentication no’ (looks like two lines are same in this file)
    issue ‘service sshd reload’

Leave a Reply

Your email address will not be published. Required fields are marked *