{"id":9111,"date":"2026-03-28T16:41:42","date_gmt":"2026-03-28T16:41:42","guid":{"rendered":"https:\/\/ideastomakemoneytoday.online\/?p=9111"},"modified":"2026-03-28T16:41:43","modified_gmt":"2026-03-28T16:41:43","slug":"how-one-can-set-up-ssh-key-authentication-on-a-linux-vps","status":"publish","type":"post","link":"https:\/\/ideastomakemoneytoday.online\/?p=9111","title":{"rendered":"How one can Set Up SSH Key Authentication on a Linux VPS"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<figure class=\"wp-block-image size-large\"><\/figure>\n<div class=\"wp-block-post-excerpt\">\n<p class=\"wp-block-post-excerpt__excerpt\">Password-based SSH authentication is the commonest entry level for brute-force assaults on Linux servers. SSH key authentication replaces the password with a cryptographic key pair: a non-public key that by no means leaves your native machine, and a public key that lives on the server. This information walks by the entire setup, from key technology to\u2026 <\/p>\n<\/div>\n<p>            <!-- jtoc progress bar widget --><\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"how-ssh-key-authentication-works\"><strong>How SSH Key Authentication Works<\/strong><\/h2>\n<p>If you join with key authentication, the server checks whether or not the general public key in its authorized_keys file matches the non-public key in your native machine, utilizing a cryptographic problem. No password is transmitted over the community. In case your non-public key&#8217;s protected with a passphrase, you enter the passphrase domestically, and it by no means leaves your machine.<\/p>\n<p>The sensible profit over passwords is twofold: key authentication is just not weak to brute-force assaults (there isn&#8217;t a password to guess), and it permits automation with out storing passwords in scripts or surroundings variables.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"prerequisites\"><strong>Stipulations<\/strong><\/h2>\n<ul class=\"wp-block-list\">\n<li>A Linux VPS operating Ubuntu, AlmaLinux, or Debian with a root or sudo person<\/li>\n<li>SSH entry with password authentication (you\u2019ll change to key auth by the top of this information)<\/li>\n<li>An area machine operating Linux, macOS, or Home windows with OpenSSH shopper put in (comes pre-installed on macOS and Home windows 10\/11)<\/li>\n<\/ul>\n<p>InMotion\u2019s <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.inmotionhosting.com\/cloud-vps\">Cloud VPS<\/a> plans embrace Ubuntu 22.04 LTS, AlmaLinux 9, and Debian 12 with root SSH entry from provisioning. <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">Managed VPS<\/a> plans additionally assist SSH entry.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-1-generate-the-ssh-key-pair-on-your-local-machine\"><strong>Step 1: Generate the SSH Key Pair on Your Native Machine<\/strong><\/h2>\n<p>Run the next in your native machine, not the server.<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh-keygen -t ed25519 -C \"your_identifier\"<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">keygen <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">t ed25519 <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #79B8FF\">C<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"your_identifier\"<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>The Ed25519 algorithm is the present really useful customary. When prompted for a file title, press Enter to make use of the default (~\/.ssh\/id_ed25519 on Linux\/macOS, %USERPROFILE%.sshid_ed25519 on Home windows). Including a passphrase is strongly really useful for any key used to entry manufacturing infrastructure.<\/p>\n<p>Two recordsdata are created: id_ed25519 (your non-public key, by no means share this) and id_ed25519.pub (your public key, this goes on the server).<\/p>\n<p>In case your server or group requires RSA keys, generate a 4096-bit RSA key as a substitute:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh-keygen -t rsa -b 4096 -C \"your_identifier\"<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">keygen <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">t rsa <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">b <\/span><span style=\"color: #79B8FF\">4096<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #79B8FF\">C<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"your_identifier\"<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-2-copy-the-public-key-to-the-server\"><strong>Step 2: Copy the Public Key to the Server<\/strong><\/h2>\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"option-a-using-ssh-copy-id-linux-macos\"><strong>Choice A: Utilizing ssh-copy-id (Linux\/macOS)<\/strong><\/h3>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh-copy-id -i ~\/.ssh\/id_ed25519.pub username@your-server-ip<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">copy<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">id <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">i <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519.pub username@your<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">server<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">ip<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>This copies the general public key to ~\/.ssh\/authorized_keys on the server and units the right permissions robotically.<\/p>\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"option-b-manually-windows-or-when-ssh-copy-id-is-unavailable\"><strong>Choice B: Manually (Home windows or when ssh-copy-id is unavailable)<\/strong><\/h3>\n<p>Show your public key:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">cat ~\/.ssh\/id_ed25519.pub<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">cat <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519.pub<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Copy your entire output. Then on the server:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">mkdir -p ~\/.sshnano ~\/.ssh\/authorized_keys<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">mkdir <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">p <\/span><span style=\"color: #F97583\">~<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #79B8FF\">.<\/span><span style=\"color: #DBEDFF\">sshnano ~<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">authorized_keys<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Paste the general public key on a brand new line, save, and exit. Then set the right permissions:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">chmod 700 ~\/.sshchmod 600 ~\/.ssh\/authorized_keys<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">chmod <\/span><span style=\"color: #79B8FF\">700<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">~<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #79B8FF\">.<\/span><span style=\"color: #DBEDFF\">sshchmod 600 ~<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">authorized_keys<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Permission settings matter. If authorized_keys is world-readable, SSH will refuse to make use of it.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-3-test-key-authentication-before-disabling-passwords\"><strong>Step 3: Take a look at Key Authentication Earlier than Disabling Passwords<\/strong><\/h2>\n<p>Open a brand new terminal window and join utilizing the important thing:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh -i ~\/.ssh\/id_ed25519 username@your-server-ip<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh <\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">i <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519 username@your<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">server<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">ip<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>If this succeeds with out prompting for a password (or after getting into your key passphrase if you happen to set one), key authentication is working. Don&#8217;t shut your current SSH session till you affirm this. Shedding each authentication strategies concurrently locks you out of the server.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-4-harden-sshd-config\"><strong>Step 4: Harden sshd_config<\/strong><\/h2>\n<p>As soon as key authentication is confirmed working, open the SSH daemon configuration file:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">sudo nano \/and so forth\/ssh\/sshd_config<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">sudo nano <\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">and so forth<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">sshd_config<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Make the next adjustments:<\/p>\n<p><strong>PasswordAuthentication no<\/strong> disables password login. Solely key-authenticated connections are permitted.<\/p>\n<p><strong>PermitRootLogin no<\/strong> (or prohibit-password) prevents direct root login. Use a normal person with sudo as a substitute.<\/p>\n<p><strong>PubkeyAuthentication sure<\/strong> confirms public key authentication is enabled (often already set to sure by default).<\/p>\n<p><strong>AuthorizedKeysFile .ssh\/authorized_keys<\/strong> specifies the important thing file location (confirm this isn&#8217;t commented out).<\/p>\n<p>Optionally, altering the default SSH port from 22 to a non-standard port (similar to 2222 or any port above 1024) reduces the quantity of automated scanning site visitors. That is safety by obscurity, not an alternative to correct authentication, however it considerably reduces log noise.<\/p>\n<p>Save and shut the file.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-5-restart-the-ssh-service\"><strong>Step 5: Restart the SSH Service<\/strong><\/h2>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">sudo systemctl restart sshd<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">sudo systemctl restart sshd<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>On some distributions, the service title is ssh moderately than sshd:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">sudo systemctl restart ssh<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">sudo systemctl restart ssh<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Necessary: take a look at connectivity from a brand new terminal session earlier than closing your current connection. On AlmaLinux and CentOS-based methods, SELinux could block non-standard SSH ports. In case you modified the port, enable it by the firewall:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">sudo firewall-cmd --permanent --add-port=2222\/tcpsudo firewall-cmd --reload<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">sudo firewall<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">cmd <\/span><span style=\"color: #F97583\">--<\/span><span style=\"color: #E1E4E8\">everlasting <\/span><span style=\"color: #F97583\">--<\/span><span style=\"color: #E1E4E8\">add<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">port<\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #79B8FF\">2222<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">tcpsudo firewall<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">cmd <\/span><span style=\"color: #F97583\">--<\/span><span style=\"color: #E1E4E8\">reload<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>On Ubuntu utilizing UFW:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">sudo ufw enable 2222\/tcpsudo ufw delete enable 22\/tcp<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">sudo ufw enable <\/span><span style=\"color: #79B8FF\">2222<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">tcpsudo ufw <\/span><span style=\"color: #F97583\">delete<\/span><span style=\"color: #E1E4E8\"> enable <\/span><span style=\"color: #79B8FF\">22<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">tcp<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"step-6-add-your-key-to-ssh-agent-for-convenience\"><strong>Step 6: Add Your Key to SSH Agent for Comfort<\/strong><\/h2>\n<p>In case you set a passphrase in your key (which it&#8217;s best to), getting into it on each connection turns into tedious. The SSH agent caches the decrypted key in reminiscence in the course of your session.<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">eval \"$(ssh-agent -s)\"ssh-add ~\/.ssh\/id_ed25519<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">eval <\/span><span style=\"color: #9ECBFF\">\"$(ssh-agent -s)\"<\/span><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">add <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>On macOS, add -Okay to retailer the passphrase in your keychain:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh-add --apple-use-keychain ~\/.ssh\/id_ed25519<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">add <\/span><span style=\"color: #F97583\">--<\/span><span style=\"color: #E1E4E8\">apple<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">use<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">keychain <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>On Home windows, the OpenSSH Authentication Agent service could be configured to begin robotically through Providers or PowerShell.<\/p>\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"managing-multiple-keys-and-servers\"><strong>Managing A number of Keys and Servers<\/strong><\/h2>\n<p>A ~\/.ssh\/config file simplifies connecting to a number of servers with out specifying the important thing file and person on each command.<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">Host production-vps\u00a0 HostName 192.0.2.100\u00a0 Person deploy\u00a0 IdentityFile ~\/.ssh\/id_ed25519\u00a0 Port 2222Host staging-vps\u00a0 HostName 192.0.2.101\u00a0 Person deploy\u00a0 IdentityFile ~\/.ssh\/id_ed25519_staging\u00a0 Port 22<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">Host manufacturing<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">vps\u00a0 HostName <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">2.100<\/span><span style=\"color: #E1E4E8\">\u00a0 Person deploy\u00a0 IdentityFile <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519\u00a0 Port 2222Host staging<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">vps\u00a0 HostName <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">2.101<\/span><span style=\"color: #E1E4E8\">\u00a0 Person deploy\u00a0 IdentityFile <\/span><span style=\"color: #F97583\">~\/<\/span><span style=\"color: #E1E4E8\">.ssh<\/span><span style=\"color: #F97583\">\/<\/span><span style=\"color: #E1E4E8\">id_ed25519_staging\u00a0 Port <\/span><span style=\"color: #79B8FF\">22<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>With this config in place, connecting to manufacturing is just:<\/p>\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><\/p>\n<pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly=\"readonly\">ssh production-vps<\/textarea><\/pre>\n<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"\/><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\/><\/svg><\/span><\/p>\n<pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">ssh manufacturing<\/span><span style=\"color: #F97583\">-<\/span><span style=\"color: #E1E4E8\">vps<\/span><\/span><\/code><\/pre>\n<\/div>\n<p>Associated: <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.inmotionhosting.com\/blog\/how-to-setup-vps-server\/\">How one can Setup a VPS Server<\/a> covers the complete VPS provisioning workflow together with preliminary SSH connection.<\/p>\n<figure class=\"wp-block-table\">\n<table class=\"has-fixed-layout\">\n<tbody>\n<tr>\n<td><strong>InMotion\u2019s Cloud VPS and Managed VPS plans assist SSH key authentication from provisioning. Root and sudo entry on Linux, no Home windows-only dependencies. Discover plans at inmotionhosting.com\/cloud-vps.<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure><\/div>\n<p><script id=\"facebook-meta-script-js-after\">\n!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https:\/\/connect.facebook.net\/en_US\/fbevents.js');fbq('init','164237177383067');fbq('track','PageView')\n\/\/# sourceURL=facebook-meta-script-js-after\n<\/script><br \/>\n<br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Password-based SSH authentication is the commonest entry level for brute-force assaults on Linux servers. SSH key authentication replaces the password with a cryptographic key pair: a non-public key that by no means leaves your native machine, and a public key that lives on the server. This information walks by the entire setup, from key technology [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png","fifu_image_alt":"","footnotes":""},"categories":[42],"tags":[4981,706,3585,242,3692,77],"class_list":["post-9111","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oline-business","tag-authentication","tag-key","tag-linux","tag-set","tag-ssh","tag-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ideastomakemoneytoday.online\/?p=9111\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday\" \/>\n<meta property=\"og:description\" content=\"Password-based SSH authentication is the commonest entry level for brute-force assaults on Linux servers. SSH key authentication replaces the password with a cryptographic key pair: a non-public key that by no means leaves your native machine, and a public key that lives on the server. This information walks by the entire setup, from key technology [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ideastomakemoneytoday.online\/?p=9111\" \/>\n<meta property=\"og:site_name\" content=\"ideastomakemoneytoday\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-28T16:41:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-28T16:41:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png\" \/><meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"g6pm6\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"g6pm6\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111\"},\"author\":{\"name\":\"g6pm6\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/#\\\/schema\\\/person\\\/eb9631f61bc5ab134298c1c4481b0cce\"},\"headline\":\"How one can Set Up SSH Key Authentication on a Linux VPS\",\"datePublished\":\"2026-03-28T16:41:42+00:00\",\"dateModified\":\"2026-03-28T16:41:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111\"},\"wordCount\":876,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.inmotionhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1\",\"keywords\":[\"Authentication\",\"Key\",\"Linux\",\"Set\",\"SSH\",\"VPS\"],\"articleSection\":[\"Oline Business\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111\",\"url\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111\",\"name\":\"How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.inmotionhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1\",\"datePublished\":\"2026-03-28T16:41:42+00:00\",\"dateModified\":\"2026-03-28T16:41:43+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/#\\\/schema\\\/person\\\/eb9631f61bc5ab134298c1c4481b0cce\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.inmotionhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.inmotionhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?p=9111#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How one can Set Up SSH Key Authentication on a Linux VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/#website\",\"url\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/\",\"name\":\"ideastomakemoneytoday\",\"description\":\"My WordPress Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/#\\\/schema\\\/person\\\/eb9631f61bc5ab134298c1c4481b0cce\",\"name\":\"g6pm6\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g\",\"caption\":\"g6pm6\"},\"sameAs\":[\"https:\\\/\\\/ideastomakemoneytoday.online\"],\"url\":\"https:\\\/\\\/ideastomakemoneytoday.online\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ideastomakemoneytoday.online\/?p=9111","og_locale":"en_US","og_type":"article","og_title":"How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday","og_description":"Password-based SSH authentication is the commonest entry level for brute-force assaults on Linux servers. SSH key authentication replaces the password with a cryptographic key pair: a non-public key that by no means leaves your native machine, and a public key that lives on the server. This information walks by the entire setup, from key technology [&hellip;]","og_url":"https:\/\/ideastomakemoneytoday.online\/?p=9111","og_site_name":"ideastomakemoneytoday","article_published_time":"2026-03-28T16:41:42+00:00","article_modified_time":"2026-03-28T16:41:43+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png","type":"","width":"","height":""},{"url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png","width":1024,"height":1024,"type":"image\/jpeg"}],"author":"g6pm6","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png","twitter_misc":{"Written by":"g6pm6","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#article","isPartOf":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111"},"author":{"name":"g6pm6","@id":"https:\/\/ideastomakemoneytoday.online\/#\/schema\/person\/eb9631f61bc5ab134298c1c4481b0cce"},"headline":"How one can Set Up SSH Key Authentication on a Linux VPS","datePublished":"2026-03-28T16:41:42+00:00","dateModified":"2026-03-28T16:41:43+00:00","mainEntityOfPage":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111"},"wordCount":876,"commentCount":0,"image":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1","keywords":["Authentication","Key","Linux","Set","SSH","VPS"],"articleSection":["Oline Business"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ideastomakemoneytoday.online\/?p=9111#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111","url":"https:\/\/ideastomakemoneytoday.online\/?p=9111","name":"How one can Set Up SSH Key Authentication on a Linux VPS - ideastomakemoneytoday","isPartOf":{"@id":"https:\/\/ideastomakemoneytoday.online\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#primaryimage"},"image":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1","datePublished":"2026-03-28T16:41:42+00:00","dateModified":"2026-03-28T16:41:43+00:00","author":{"@id":"https:\/\/ideastomakemoneytoday.online\/#\/schema\/person\/eb9631f61bc5ab134298c1c4481b0cce"},"breadcrumb":{"@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ideastomakemoneytoday.online\/?p=9111"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#primaryimage","url":"https:\/\/i0.wp.com\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Set-Up-SSH-Key-Authentication-on-a-Linux-VPS.png?ssl=1"},{"@type":"BreadcrumbList","@id":"https:\/\/ideastomakemoneytoday.online\/?p=9111#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ideastomakemoneytoday.online\/"},{"@type":"ListItem","position":2,"name":"How one can Set Up SSH Key Authentication on a Linux VPS"}]},{"@type":"WebSite","@id":"https:\/\/ideastomakemoneytoday.online\/#website","url":"https:\/\/ideastomakemoneytoday.online\/","name":"ideastomakemoneytoday","description":"My WordPress Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ideastomakemoneytoday.online\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ideastomakemoneytoday.online\/#\/schema\/person\/eb9631f61bc5ab134298c1c4481b0cce","name":"g6pm6","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8269f4471ad6ee9d66fe62ec749f04d5e01348d5ec8dfe671fe8b3ce6b35de6f?s=96&d=mm&r=g","caption":"g6pm6"},"sameAs":["https:\/\/ideastomakemoneytoday.online"],"url":"https:\/\/ideastomakemoneytoday.online\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/posts\/9111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9111"}],"version-history":[{"count":1,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/posts\/9111\/revisions"}],"predecessor-version":[{"id":9112,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/posts\/9111\/revisions\/9112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=\/wp\/v2\/media\/9113"}],"wp:attachment":[{"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ideastomakemoneytoday.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}