{"id":14687,"date":"2025-10-13T13:39:26","date_gmt":"2025-10-13T13:39:26","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=14687"},"modified":"2026-02-26T14:02:06","modified_gmt":"2026-02-26T14:02:06","slug":"how-to-add-ssh-keys-to-your-github-account","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/","title":{"rendered":"How to Add SSH Keys to Your GitHub Account"},"content":{"rendered":"<p>In this article, we will explain how to add SSH keys to your GitHub Account.<\/p>\n<p>Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.<\/p>\n<p>Let us follow the guide:<\/p>\n<ol>\n<li>Open your terminal (Linux\/macOS) or Git Bash (Windows).<\/li>\n<li>Run the following command to see if you already have an SSH key:\n<pre><span style=\"color: #3366ff;\">ls -al ~\/.ssh<\/span><\/pre>\n<\/li>\n<li>Look for files named \u2018<span style=\"text-decoration: underline;\">id_rsa.pub<\/span>\u2019 or \u2018<span style=\"text-decoration: underline;\">id_ed25519.pub\u2019<\/span>. If present, you can use them; otherwise, proceed to generate a new key.<\/li>\n<li>Generate a new SSH key by running:\n<pre>ssh-keygen -t ed25519 -C \u201c<span style=\"color: #3366ff;\">your_email@test.com<\/span>\u201d<\/pre>\n<p>If your system doesn\u2019t support ed25519, use:<\/p>\n<pre>ssh-keygen -t rsa -b 4096 -C \u201c<span style=\"color: #3366ff;\">your_email@test.com<\/span>\u201d<\/pre>\n<\/li>\n<li>When prompted to \u201c<span style=\"text-decoration: underline;\">Enter a file in which to save the key,<\/span>\u201d press <span style=\"text-decoration: underline;\">Enter<\/span> to accept the default.<\/li>\n<li>Add a passphrase if you want extra security (optional).<\/li>\n<li>Start the SSH agent by running:\n<pre><span style=\"color: #3366ff;\">eval \u201c$(ssh-agent -s)\u201d<\/span><\/pre>\n<\/li>\n<li>Add your key to the agent:\n<pre><span style=\"color: #3366ff;\">ssh-add ~\/.ssh\/id_ed25519<\/span><\/pre>\n<p>Replace \u2018id_ed25519\u2019 with your key filename if different.<\/li>\n<li>Copy your public key to the clipboard:\n<pre><span style=\"color: #3366ff;\">cat ~\/.ssh\/id_ed25519.pub<\/span><\/pre>\n<\/li>\n<li>Copy the full output (starts with ssh-ed25519 or ssh-rsa).<\/li>\n<li>Log in to your GitHub account.<\/li>\n<li>Go to \u2018<span style=\"text-decoration: underline;\">Settings&gt;SSH and GPG keys&gt;New SSH key<\/span>\u2019.<\/li>\n<li>Give your key a descriptive Title (e.g., \u201c<span style=\"text-decoration: underline;\">Work Laptop<\/span>\u201d).<\/li>\n<li>Paste your public key into the \u2018<span style=\"text-decoration: underline;\">Key<\/span>\u2019 field.<\/li>\n<li>Click \u2018<span style=\"text-decoration: underline;\">Add SSH key\u2019<\/span>.<\/li>\n<li>Test your SSH connection by running:\n<pre>ssh -T <span style=\"color: #3366ff;\">git@github.com<\/span><\/pre>\n<p>You should see a message like:<br \/>\n<strong>Hi username! You\u2019ve successfully authenticated, but GitHub does not provide shell access.<\/strong><\/li>\n<\/ol>\n<p>In this manner, adding SSH keys to GitHub improves security and makes working with repositories faster and more convenient. Make sure to keep your private keys safe and never share them.<\/p>\n<p>Visit our Knowledge Base to learn <a href=\"https:\/\/www.bodhost.com\/kb\/change-ssh-port-in-red-hat-enterprise-linux\/\" target=\"_blank\" rel=\"noopener\"><em>how to change the SSH Port in Red Hat Enterprise Linux<\/em><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will explain how to add SSH keys to your GitHub Account. Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time. Let us follow the guide: Open your terminal (Linux\/macOS) or Git Bash (Windows). Run the following command to [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[837],"tags":[1655],"class_list":["post-14687","post","type-post","status-publish","format-standard","hentry","category-tutorial","tag-add-ssh-keys-to-your-github-account"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Adding a new SSH key to your GitHub account<\/title>\n<meta name=\"description\" content=\"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.\" \/>\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.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding a new SSH key to your GitHub account\" \/>\n<meta property=\"og:description\" content=\"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-13T13:39:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:06+00:00\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Add SSH Keys to Your GitHub Account\",\"datePublished\":\"2025-10-13T13:39:26+00:00\",\"dateModified\":\"2026-02-26T14:02:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/\"},\"wordCount\":289,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Add SSH Keys to Your GitHub Account\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/\",\"name\":\"Adding a new SSH key to your GitHub account\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2025-10-13T13:39:26+00:00\",\"dateModified\":\"2026-02-26T14:02:06+00:00\",\"description\":\"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-add-ssh-keys-to-your-github-account\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorial\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add SSH Keys to Your GitHub Account\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding a new SSH key to your GitHub account","description":"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.","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.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/","og_locale":"en_US","og_type":"article","og_title":"Adding a new SSH key to your GitHub account","og_description":"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2025-10-13T13:39:26+00:00","article_modified_time":"2026-02-26T14:02:06+00:00","author":"Serena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Add SSH Keys to Your GitHub Account","datePublished":"2025-10-13T13:39:26+00:00","dateModified":"2026-02-26T14:02:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/"},"wordCount":289,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Add SSH Keys to Your GitHub Account"],"articleSection":["Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/","name":"Adding a new SSH key to your GitHub account","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2025-10-13T13:39:26+00:00","dateModified":"2026-02-26T14:02:06+00:00","description":"Adding SSH keys to your GitHub account allows you to securely connect to repositories without entering your username and password each time.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-add-ssh-keys-to-your-github-account\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorial","item":"https:\/\/www.bodhost.com\/kb\/category\/tutorial\/"},{"@type":"ListItem","position":2,"name":"How to Add SSH Keys to Your GitHub Account"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=14687"}],"version-history":[{"count":4,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14687\/revisions"}],"predecessor-version":[{"id":14691,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14687\/revisions\/14691"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=14687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=14687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=14687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}