GICT knowledge base
Diagnose SSH Permission Denied Errors on cPanel Servers
Published
An SSH message such as Permission denied (publickey,gssapi-keyex,gssapi-with-mic) means authentication did not complete with the methods offered. It does not prove that password authentication is accidentally disabled or that enabling root password login is the right fix.
Check the intended connection
- Confirm the host, configured port and exact username. A cPanel website account is not the server’s root account, and shell access must be included and enabled for the account.
- Verify the server host key through a trusted route. Do not disable host-key checking or accept an unexplained changed key just to continue.
- Check which private key your client offers and whether its matching public key is authorized for that user. A key uploaded in cPanel may also require its explicit authorization.
- Inspect client diagnostic output and have an authorized administrator correlate it with private server logs. Redact usernames, paths and other sensitive details before sharing; never send the private key.
Review policy instead of weakening it
OpenSSH settings such as PasswordAuthentication, PubkeyAuthentication, PermitRootLogin, AuthenticationMethods and per-user Match rules have distinct purposes. Account restrictions, key-file ownership/modes and StrictModes can also matter. Disabling StrictModes, enabling remote root passwords or restarting SSH blindly is not a general repair.
The previous Enable Password Auth recipe is withdrawn as a default solution. A password-based route is appropriate only if it is part of the approved access policy, not as a bypass for a failed key or missing account entitlement.
If administrative recovery is needed
Use an existing authorized administrator session or the provider’s verified recovery/console process. Keep working recovery access available, validate any proposed SSH configuration before a controlled reload, and test a second connection before closing the original. An ordinary hosting account does not gain root permissions merely because WHM has an SSH control.
References: OpenSSH authentication and access policies; cPanel SSH key management and authorization.
Reviewed October 15, 2026. Documentation review; no SSH key, authentication policy, daemon or customer connection was changed.
Related guides
How to Install and Uninstall JetBackup for cPanel
How to Install JetBackup for cPanel. JetBackup is one of the leading backup solutions for cPanel & WHM that offers a user-friendly GUI. It provides
WHMSetup SendGrid on your cPanel VPS/Server
Setup SendGrid on your cPanel VPS/Server. SendGrid provides a cloud-based service for reliable transactional and marketing email.
WHMChange cPanel Nameserver Software to PowerDNS Carefully
Review WHM nameserver selection, resolver dependencies, cluster compatibility and DNSSEC requirements before a planned PowerDNS service change.
WHMTroubleshooting Jailed Shell on OpenVZ
cPanel/WHM providing Jailed shell environment for users, this feature giving high-level security for users when doing ssh access to their server.
