{"id":94,"date":"2026-11-18T06:04:17","date_gmt":"2026-11-18T06:04:17","guid":{"rendered":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/"},"modified":"2026-11-18T06:04:17","modified_gmt":"2026-11-18T06:04:17","slug":"ssh-key-authentication-linux-server-setup","status":"publish","type":"post","link":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/","title":{"rendered":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist"},"content":{"rendered":"<p>SSH gives administrators a secure way to manage a Linux web server remotely. A password can work, but it is easy to reuse, guess or expose through phishing. SSH key authentication replaces the account password at login with a cryptographic key pair. The private key stays on your device; the public key is installed on the server. Here is a practical setup checklist that reduces risk without accidentally locking you out.<\/p>\n<h2>Understand What the Two Keys Do<\/h2>\n<p>When you connect, the server checks that your client controls the private key corresponding to an authorised public key. The private key is never copied to the server. This does not make the server automatically secure: an infected laptop or a stolen, unprotected private key can still give an attacker access. Use a passphrase and keep the device itself protected.<\/p>\n<h2>Generate a Dedicated Key Pair<\/h2>\n<p>On your own computer, run <code>ssh-keygen -t ed25519 -C \"your-name@your-device\"<\/code>. Accept a dedicated file path if you manage multiple servers, and choose a strong passphrase. The command creates a private key and a matching <code>.pub<\/code> file. Share only the public key. Never paste the private key into a ticket, email or web control panel.<\/p>\n<p>Keep a recoverable backup of the private key in an encrypted location you control. A password manager that supports files or an encrypted backup drive can help. Record which public key belongs to which administrator so you can remove access cleanly later.<\/p>\n<h2>Install the Public Key and Test It<\/h2>\n<p>While password login still works, use <code>ssh-copy-id -i ~\/.ssh\/id_ed25519.pub user@server<\/code> to append your public key to the account&#8217;s <code>~\/.ssh\/authorized_keys<\/code>. If you use a custom key filename, substitute its path. On systems without <code>ssh-copy-id<\/code>, install the public key manually, taking care not to overwrite other administrators&#8217; entries.<\/p>\n<p>Open a <em>second<\/em> terminal and test <code>ssh -i ~\/.ssh\/id_ed25519 user@server<\/code>. Leave the original working session open until the new login succeeds. If authentication fails, check ownership and permissions on the home directory, <code>~\/.ssh<\/code> and <code>authorized_keys<\/code>. Our guide to <a href=\"https:\/\/www.tempohosting.co.uk\/blog\/linux-file-permissions-chmod-chown-safer-websites\/\" target=\"_blank\" rel=\"noopener\">Linux file permissions<\/a> explains why overly open files can cause trouble.<\/p>\n<h2>Harden Access Without Losing Recovery<\/h2>\n<p>Only after key login works for every required administrator should you consider disabling password authentication in the SSH server configuration. Keep a verified provider console or other recovery route available first. Apply changes carefully, validate the configuration, and test another new session before closing existing connections. If the service fails to reload, our <a href=\"https:\/\/www.tempohosting.co.uk\/blog\/linux-service-troubleshooting-systemctl-journalctl\/\" target=\"_blank\" rel=\"noopener\">systemd troubleshooting checklist<\/a> can help you inspect service status and logs.<\/p>\n<p>When a client first connects, verify the server&#8217;s host-key fingerprint through a trusted channel rather than blindly accepting an unexpected identity. SSH keys authenticate users, while host-key checking helps confirm that you reached the intended server.<\/p>\n<h2>Review and Revoke Access<\/h2>\n<p>Give each person their own key; do not share a single private key across a team. Review <code>authorized_keys<\/code> after staff changes, remove obsolete entries, and investigate unfamiliar login attempts in SSH logs. Rotation is especially important if a device is lost or a private key may have been exposed. The goal is a small, auditable set of authorised keys and a tested recovery path\u2014not a configuration change that nobody can safely undo.<\/p>\n<p>For command examples and configuration details, see the official <a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/security\/openssh-server\/\" target=\"_blank\" rel=\"noopener\">Ubuntu OpenSSH server guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set up SSH key authentication on a Linux server with a safe checklist for creating keys, testing access, hardening logins and revoking old keys.<\/p>\n","protected":false},"author":2,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[26],"tags":[31,43,79,16],"class_list":["post-94","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux-commands","tag-linux-file-permissions","tag-ssh-key-authentication","tag-website-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog<\/title>\n<meta name=\"description\" content=\"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog\" \/>\n<meta property=\"og:description\" content=\"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Tempo Hosting Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T06:04:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Arthur Edward\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arthur Edward\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/\"},\"author\":{\"name\":\"Arthur Edward\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\"},\"headline\":\"SSH Key Authentication for Linux Servers: A Practical Setup Checklist\",\"datePublished\":\"2026-11-18T06:04:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/\"},\"wordCount\":526,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/ssh-key-authentication.webp\",\"keywords\":[\"Linux commands\",\"Linux file permissions\",\"SSH key authentication\",\"website security\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/\",\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/\",\"name\":\"SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/ssh-key-authentication.webp\",\"datePublished\":\"2026-11-18T06:04:17+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\"},\"description\":\"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/ssh-key-authentication.webp\",\"contentUrl\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/ssh-key-authentication.webp\",\"width\":1200,\"height\":675,\"caption\":\"SSH key authentication\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/ssh-key-authentication-linux-server-setup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SSH Key Authentication for Linux Servers: A Practical Setup Checklist\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/\",\"name\":\"Tempo Hosting Blog\",\"description\":\"Practical guides to web hosting, websites, domains and online success.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\",\"name\":\"Arthur Edward\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"caption\":\"Arthur Edward\"},\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/author\\\/arthur-edward\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog","description":"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.","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:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/","og_locale":"en_US","og_type":"article","og_title":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog","og_description":"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.","og_url":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/","og_site_name":"Tempo Hosting Blog","article_published_time":"2026-11-18T06:04:17+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp","type":"image\/webp"}],"author":"Arthur Edward","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Arthur Edward","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#article","isPartOf":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/"},"author":{"name":"Arthur Edward","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903"},"headline":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist","datePublished":"2026-11-18T06:04:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/"},"wordCount":526,"commentCount":0,"image":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#primaryimage"},"thumbnailUrl":"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp","keywords":["Linux commands","Linux file permissions","SSH key authentication","website security"],"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/","url":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/","name":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist - Tempo Hosting Blog","isPartOf":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#primaryimage"},"image":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#primaryimage"},"thumbnailUrl":"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp","datePublished":"2026-11-18T06:04:17+00:00","author":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903"},"description":"Set up SSH key authentication on a Linux server: generate and protect keys, test access safely, verify server identity, and revoke old keys.","breadcrumb":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#primaryimage","url":"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp","contentUrl":"https:\/\/www.tempohosting.co.uk\/blog\/wp-content\/uploads\/2026\/11\/ssh-key-authentication.webp","width":1200,"height":675,"caption":"SSH key authentication"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tempohosting.co.uk\/blog\/ssh-key-authentication-linux-server-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tempohosting.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"SSH Key Authentication for Linux Servers: A Practical Setup Checklist"}]},{"@type":"WebSite","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#website","url":"https:\/\/www.tempohosting.co.uk\/blog\/","name":"Tempo Hosting Blog","description":"Practical guides to web hosting, websites, domains and online success.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tempohosting.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903","name":"Arthur Edward","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","caption":"Arthur Edward"},"url":"https:\/\/www.tempohosting.co.uk\/blog\/author\/arthur-edward\/"}]}},"_links":{"self":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":0,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}