{"id":376,"date":"2025-11-26T14:08:15","date_gmt":"2025-11-26T14:08:15","guid":{"rendered":"https:\/\/cloudabove.com\/kb\/ssh-keys\/"},"modified":"2025-11-26T14:08:15","modified_gmt":"2025-11-26T14:08:15","slug":"ssh-keys","status":"publish","type":"post","link":"https:\/\/cloudabove.com\/help\/ssh-keys\/","title":{"rendered":"SSH Keys"},"content":{"rendered":"\n<p>SSH (Secure Shell) keys provide a secure way to access your server\u2019s terminal without using passwords. Instead of typing a password each time, you authenticate with a cryptographic key pair. This improves security and convenience, especially for developers and administrators managing hosting environments.<\/p>\n\n\n\n<p>This guide explains:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What SSH keys are<\/li>\n\n\n\n<li>How to generate SSH keys on different operating systems<\/li>\n\n\n\n<li>How to add them to <strong>cPanel<\/strong> and <strong>Plesk<\/strong> servers for terminal access<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What Are SSH Keys?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SSH Key Pair<\/strong>: Consists of a <strong>public key<\/strong> (shared with the server) and a <strong>private key<\/strong> (kept secret on your computer).<\/li>\n\n\n\n<li><strong>Authentication<\/strong>: When you connect via SSH, the server checks if your private key matches the stored public key.<\/li>\n\n\n\n<li><strong>Security Advantage<\/strong>: Stronger than passwords, resistant to brute-force attacks, and can be encrypted with a passphrase.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Generate SSH Keys<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">On Linux\/macOS (OpenSSH)<\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Open a terminal.<\/li>\n\n\n\n<li>Run: \n<ul class=\"wp-block-list\">\n<li><code><em><strong>ssh-keygen -t rsa -b 4096 -C \"your_email@example.com<\/strong><\/em>\"<\/code> OR just <strong><code>ssh-keygen<\/code><\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Press <strong>Enter<\/strong> to accept the default location (<code>~\/.ssh\/id_rsa<\/code>).<\/li>\n\n\n\n<li>Optionally set a passphrase for extra security.<\/li>\n\n\n\n<li>Keys generated:\n<ul class=\"wp-block-list\">\n<li>Private key: <code>~\/.ssh\/id_rsa<\/code><\/li>\n\n\n\n<li>Public key: <code>~\/.ssh\/id_rsa.pub<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"400\" src=\"https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/SSH-Keygen.gif\" alt=\"\" class=\"wp-image-380\" style=\"width:840px;height:auto\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">On Windows (PowerShell)<\/h3>\n\n\n\n<p>Windows 10 and later include <strong>OpenSSH Client<\/strong> by default, so you can generate keys directly in PowerShell:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Open <strong>PowerShell<\/strong> as Administrator.<\/li>\n\n\n\n<li>Run the following command: <code><strong>ssh-keygen -t rsa -b 4096 -C \"your_email@example.com\"<\/strong><\/code><\/li>\n\n\n\n<li>When prompted for a file location, press <strong>Enter<\/strong> to accept the default (<code>C:\\Users\\&lt;YourUser&gt;\\.ssh\\id_rsa<\/code>).<\/li>\n\n\n\n<li>Optionally set a passphrase for extra protection.<\/li>\n\n\n\n<li>Keys generated:\n<ul class=\"wp-block-list\">\n<li>Private key: <code>C:\\Users\\&lt;YourUser&gt;\\.ssh\\id_rsa<\/code><\/li>\n\n\n\n<li>Public key: <code>C:\\Users\\&lt;YourUser&gt;\\.ssh\\id_rsa.pub<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>To view your public key, run: <code><strong>Get-Content $env:USERPROFILE\\.ssh\\id_rsa.pub<\/strong> <\/code>Copy this output \u2014 you\u2019ll paste it into <strong>cPanel<\/strong> or <strong>Plesk<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35-1024x342.png\" alt=\"\" class=\"wp-image-379\" style=\"width:621px;height:auto\" srcset=\"https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35-1024x342.png 1024w, https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35-300x100.png 300w, https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35-768x257.png 768w, https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35-770x257.png 770w, https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/image-35.png 1110w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">On Windows (using PuTTYgen)<\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Download and open <strong>PuTTYgen<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Generate<\/strong> and move your mouse around to create randomness.<\/li>\n\n\n\n<li>Save the generated keys:\n<ul class=\"wp-block-list\">\n<li><strong>Private key<\/strong>: <code>.ppk<\/code> file<\/li>\n\n\n\n<li><strong>Public key<\/strong>: copy from the PuTTYgen window<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Optionally, set a passphrase for added protection.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/helpdesk.internal.freethought.uk\/download\/8e6037ec74229eb2dbb09b8570d2e5316a605f49ef54d1de7db433895ca9315b03b1418242823107?t=8f6c48e43af88038d7c0eb45f965cf14\" alt=\"8e6037ec74229eb2dbb09b8570d2e5316a605f49ef54d1de7db433895ca9315b03b1418242823107?t=8f6c48e43af88038d7c0eb45f965cf14\" style=\"width:451px;height:auto\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Add SSH Public Key in cPanel<\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Log in to <strong>cPanel<\/strong>.<\/li>\n\n\n\n<li>Navigate to <strong>Security \u2192 SSH Access<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Manage SSH Keys<\/strong>.<\/li>\n\n\n\n<li>Choose <strong>Import Key<\/strong> (to upload the public key).\n<ul class=\"wp-block-list\">\n<li>Enter a name for your key.<\/li>\n\n\n\n<li>Paste your public key (<code>id_rsa.pub<\/code>) into the provided field.<\/li>\n\n\n\n<li>Leave the private key field blank.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Import<\/strong>.<\/li>\n\n\n\n<li>Go back to <strong>Manage SSH Keys<\/strong>, locate your key<\/li>\n\n\n\n<li>Authorize the key by clicking <strong>Manage Authorization<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"392\" src=\"https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/Authorizing-SSH-keys-1.gif\" alt=\"\" class=\"wp-image-378\" style=\"width:647px;height:auto\"\/><\/figure>\n\n\n\n<p>Once authorized, you can connect via terminal: <code>ssh -p22 user@yourserverIPaddress<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Adding SSH Key in Plesk for authentication<\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Log in to <strong>Plesk<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>Websites &amp; Domains<\/strong>.<\/li>\n\n\n\n<li>On the right-hand side, click <strong>SSH Keys<\/strong>.<\/li>\n\n\n\n<li>In the <strong>SSH Keys Manager<\/strong>, click <strong>Add Key<\/strong>.<\/li>\n\n\n\n<li>Paste your public key (<code>id_rsa.pub<\/code>) into the field.<\/li>\n\n\n\n<li>Click <strong>Add<\/strong>.<\/li>\n\n\n\n<li>Note your system user and server IP address from the subscription details.<\/li>\n\n\n\n<li>Connect via SSH using: <code>ssh systemuser@server-ip<\/code><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"364\" src=\"https:\/\/kb.cloudabove.com\/wp-content\/uploads\/sites\/4\/2025\/11\/Plesk-SSH-Keys.gif\" alt=\"\" class=\"wp-image-377\" style=\"width:735px;height:auto\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Keep your private key secure<\/strong>: Never share it.<\/li>\n\n\n\n<li><strong>Use strong algorithms<\/strong>: Prefer <code>ed25519<\/code> or <code>rsa -b 4096<\/code>.<\/li>\n\n\n\n<li><strong>Restrict access<\/strong>: Ensure only authorized users can access your <code>.ssh<\/code> directory.\n<ul class=\"wp-block-list\">\n<li>Use strong permissions on your <code>.ssh<\/code> directory (<code>chmod 700 ~\/.ssh<\/code>).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Remove unused or old keys from cPanel\/Plesk to reduce risk.<\/li>\n<\/ul>\n\n\n\n<p>By generating SSH keys locally and adding the public key to <strong>cPanel<\/strong> or <strong>Plesk<\/strong>, you can securely access your server\u2019s terminal without passwords. This method improves security and streamlines workflows for developers and administrators.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Got stuck?<\/h4>\n\n\n\n<p>Open a ticket in the customer portal or email cloudabove.com\/contact-us for further help<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSH (Secure Shell) keys provide a secure way to access your server\u2019s terminal without using passwords. Instead of typing a password each time, you authenticate with a cryptographic key pair. This improves security and convenience, especially for developers and administrators managing hosting environments. This guide explains: What SSH keys are&hellip;<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,7,28],"tags":[],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-access","category-cpanel","category-plesk"],"_links":{"self":[{"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":1,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":381,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/posts\/376\/revisions\/381"}],"wp:attachment":[{"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudabove.com\/help\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}