{"id":316,"date":"2010-06-21T04:30:03","date_gmt":"2010-06-21T10:30:03","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=316"},"modified":"2026-03-30T22:27:24","modified_gmt":"2026-03-31T04:27:24","slug":"enabling-ssh-keys-using-cpanel","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/enabling-ssh-keys-using-cpanel\/","title":{"rendered":"How to Enable SSH Key Authentication in cPanel\/WHM for Secure Server Access"},"content":{"rendered":"\n<p>Securing remote server access is one of the most critical responsibilities for system administrators. Traditional password-based SSH logins are highly vulnerable to brute-force attacks, credential leaks, and automated login attempts.<\/p>\n\n\n\n<p>A more secure and recommended approach is <strong>SSH key authentication<\/strong>, which replaces passwords with encrypted cryptographic key pairs. This guide explains how to enable SSH key authentication in <strong>cPanel\/WHM<\/strong> and safely connect to your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Use SSH Keys Instead of Password Authentication?<\/h2>\n\n\n\n<p>SSH key authentication enhances server security by verifying identity through encryption rather than reusable passwords.<\/p>\n\n\n\n<p>Unlike passwords that attackers can guess or steal, SSH keys require possession of a private cryptographic key stored on your local system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Benefits of SSH Key Authentication<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Strong protection against brute-force attacks<\/li>\n\n\n\n<li>Eliminates password-based login risks<\/li>\n\n\n\n<li>Faster and automated authentication<\/li>\n\n\n\n<li>Industry-standard secure server access method<\/li>\n\n\n\n<li>Reduced chances of credential compromise<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Access SSH Security Settings in WHM<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to <strong>WHM<\/strong> as the <strong>root user<\/strong>.<\/li>\n\n\n\n<li>Navigate to:<\/li>\n<\/ol>\n\n\n\n<p><strong>Main \u2192 Security Center \u2192 SSH Password Authorization Tweak<\/strong><\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Disable <strong>Password Authentication<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>Disabling password authentication ensures only SSH keys can be used for login, significantly improving server protection.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Generate an SSH Key in WHM<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Manage SSH Keys<\/strong> in WHM.<\/li>\n\n\n\n<li>Click <strong>Generate a New Key<\/strong>.<\/li>\n\n\n\n<li>Enter a descriptive <strong>Key Name<\/strong>.<\/li>\n\n\n\n<li>Create a strong <strong>passphrase<\/strong>.<\/li>\n\n\n\n<li>Select a key type:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ED25519<\/strong> (Recommended for modern servers)<\/li>\n\n\n\n<li><strong>RSA<\/strong> (Widely supported)<\/li>\n<\/ul>\n\n\n\n<p>After generation, WHM creates:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Public Key<\/li>\n\n\n\n<li>Private Key<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Authorize the Public Key<\/h2>\n\n\n\n<p>To allow SSH access:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Locate the generated <strong>Public Key<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Authorize<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>Authorizing the key tells the server to trust connections authenticated using the matching private key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Download the Private SSH Key<\/h2>\n\n\n\n<p>Download the private key to your local computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Important Security Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Never share your private key.<\/li>\n\n\n\n<li>Store it securely.<\/li>\n\n\n\n<li>Keep backup copies in encrypted storage.<\/li>\n<\/ul>\n\n\n\n<p><strong>Windows users:<\/strong><br>Convert the key into <code>.ppk<\/code> format using <strong>PuTTYgen<\/strong> if connecting via PuTTY.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Set Secure Permissions for the Private Key<\/h2>\n\n\n\n<p>Restrict access to the private key file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod 600 \/path-to-file\/file.key<\/code><\/pre>\n\n\n\n<p>This ensures only your user account can read the key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Connect to the Server Using SSH Key Authentication<\/h2>\n\n\n\n<p>Use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh -i \/path-to-file\/file.key root@server.ip.address<\/code><\/pre>\n\n\n\n<p>If configured correctly, SSH will authenticate using the key instead of a password.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SSH Security Best Practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use strong passphrases for all SSH keys<\/li>\n\n\n\n<li>Confirm key login works before disabling passwords<\/li>\n\n\n\n<li>Rotate SSH keys periodically<\/li>\n\n\n\n<li>Avoid sharing private keys between users<\/li>\n\n\n\n<li>Maintain secure backups of authorized keys<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Why SSH Key Authentication Matters for Server Security?<\/h2>\n\n\n\n<p>Implementing SSH key authentication in cPanel\/WHM significantly strengthens server access control. By eliminating password logins, administrators can prevent common intrusion methods and reduce unauthorized access risks.<\/p>\n\n\n\n<p>SSH keys are now considered a <strong>standard security requirement<\/strong> for production servers and cloud environments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p>Enabling SSH key authentication is a simple yet powerful way to harden server security. With encrypted authentication and restricted access methods, administrators gain better protection against automated attacks and credential theft.<\/p>\n\n\n\n<p>Adopting SSH keys should be a mandatory best practice for every modern hosting or enterprise server setup.<\/p>\n\n\n\n<p>If you require help or have any doubt, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Securing remote server access is one of the most critical responsibilities for system administrators. Traditional password-based SSH logins are highly vulnerable to brute-force attacks, credential leaks, and automated login attempts.&hellip;<\/p>\n","protected":false},"author":4,"featured_media":16790,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-articles"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":7,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":16845,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions\/16845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/16790"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}