{"id":915,"date":"2019-11-05T02:46:14","date_gmt":"2019-11-05T02:46:14","guid":{"rendered":"http:\/\/www.projectimmerse.com\/blog\/?p=915"},"modified":"2020-06-15T08:51:04","modified_gmt":"2020-06-15T08:51:04","slug":"generating-ssh-keys-on-macosx","status":"publish","type":"post","link":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/","title":{"rendered":"Generating SSH Keys on MacOSX"},"content":{"rendered":"\r\n<p>If you&#8217;ve been programming for a while now, even if you consider yourself a novice, you&#8217;ve probably run into the SSH (Secure Shell) protocol. Now, don&#8217;t get intimidated by this technical term, this is just another protocol like <strong>FTP (File Transfer Protocol)<\/strong> or <strong>HTTP (Hypertext Transfer Protocol)<\/strong>. So look, you&#8217;ve already engaged with a protocol at one point in your dev career. In simple terms, protocol&#8217;s are just a set of instructions to complete a given task.<\/p>\r\n\r\n<!--more-->\r\n\r\n<p>Now this post isn&#8217;t about SSH in itself, this post is about generating SSH keys. If you&#8217;ve ever connected to a remote server using SFTP (Secure FTP) using FileZilla or any other FTP client, then chances are you&#8217;ve run across generating SSH Keys. If you&#8217;re using any code repository like <a href=\"https:\/\/github.com\/\" title=\"Github\" target=\"_blank\" rel=\"noopener noreferrer\">Github<\/a>, <a href=\"https:\/\/bitbucket.org\/\" title=\"BitBucket\" target=\"_blank\" rel=\"noopener noreferrer\">BitBucket<\/a> or <a href=\"https:\/\/about.gitlab.com\/\" title=\"GitLab\" target=\"_blank\" rel=\"noopener noreferrer\">GitLab<\/a> &#8211; you&#8217;ve also likely generated SSH Keys.<\/p>\r\n\r\n<p>To additionally preface this understanding of SSH keys, this process is essentially to provide a secure connection between a client computer and a server. Almost every protocol mentioned is related to this type of connection. Just something to keep in mind.<\/p>\r\n\r\n<p>To generate both <strong>public and private SSH keys<\/strong> following the instructions provided on the <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-on-the-Server-Generating-Your-SSH-Public-Key\" title=\"Generating SSH Keys\">Git website<\/a>. Now there are loads of other resources and documentation on the internet but I found this to be the easiest to understand so really, use the documentation that works best for you.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys-list.png\" alt=\"List SSH Keys Command\"><\/p>\r\n\r\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2019\/11\/generating-key-pair.png\" alt=\"Generating SSH Key Pairs\"><\/p>\r\n\r\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2019\/11\/ssh-public-key.png\" alt=\"Viewing SSH Public Key\"><\/p>\r\n\r\n<p>In addition to establishing a secure connection using SSH keys (because they are encrypted by using a complicated hash algorithm I can&#8217;t get into here), SSH Keys also provide a convenient way of connecting to a remote server without having to enter your username and password each and every time.<\/p>\r\n\r\n<p>Alright now for for the meat of this post. There are essentially two main keys of importance &#8211; yes, the public and private key.<\/p>\r\n\r\n<p>\r\n&#8211; <strong>id_rsa.pub (public key)<\/strong><br>\r\n&#8211; <strong>id_rsa (private key)<\/strong>\r\n<\/p>\r\n\r\n<p>Both keys are contained within your .ssh folder, notice the &#8220;.&#8221; (dot) before ssh, this means this is a system level directory.<\/p>\r\n\r\n<p>So once you are for sure SSH keys have been generated, you can check them out by running the following command:<\/p>\r\n\r\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n\r\nls ~\/.ssh\/\r\n\r\n<\/pre>\r\n\r\n<p>After running the command, you should see the generated SSH key files<\/p>\r\n\r\n<h3>id_rsa<\/h3>\r\n<p>This is the SSH private key file stored on your computer<\/p>\r\n\r\n<h3>id_rsa.pub<\/h3>\r\n<p>This is the SSH public key file stored on the remote server you wish to establish connection<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been programming for a while now, even if you consider yourself a novice, you&#8217;ve probably run into the SSH (Secure Shell) protocol. Now, don&#8217;t get intimidated by this technical term, this is just another protocol like FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol). So look, you&#8217;ve already engaged with a protocol &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Generating SSH Keys on MacOSX&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1093,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Generating SSH Keys on MacOSX - Project Immerse<\/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:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generating SSH Keys on MacOSX - Project Immerse\" \/>\n<meta property=\"og:description\" content=\"If you&#8217;ve been programming for a while now, even if you consider yourself a novice, you&#8217;ve probably run into the SSH (Secure Shell) protocol. Now, don&#8217;t get intimidated by this technical term, this is just another protocol like FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol). So look, you&#8217;ve already engaged with a protocol &hellip; Continue reading &quot;Generating SSH Keys on MacOSX&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/\" \/>\n<meta property=\"og:site_name\" content=\"Project Immerse\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-05T02:46:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-15T08:51:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"projectimmerse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"projectimmerse\" \/>\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.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/\"},\"author\":{\"name\":\"projectimmerse\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"headline\":\"Generating SSH Keys on MacOSX\",\"datePublished\":\"2019-11-05T02:46:14+00:00\",\"dateModified\":\"2020-06-15T08:51:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/\"},\"wordCount\":419,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/generating-ssh-keys.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/\",\"name\":\"Generating SSH Keys on MacOSX - Project Immerse\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/generating-ssh-keys.png\",\"datePublished\":\"2019-11-05T02:46:14+00:00\",\"dateModified\":\"2020-06-15T08:51:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/generating-ssh-keys.png\",\"contentUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/generating-ssh-keys.png\",\"width\":750,\"height\":750,\"caption\":\"Generating SSH Keys on MacOSX\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/generating-ssh-keys-on-macosx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generating SSH Keys on MacOSX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\",\"name\":\"Project Immerse\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\",\"name\":\"projectimmerse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"caption\":\"projectimmerse\"},\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/author\\\/projectimmerse\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generating SSH Keys on MacOSX - Project Immerse","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.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/","og_locale":"en_US","og_type":"article","og_title":"Generating SSH Keys on MacOSX - Project Immerse","og_description":"If you&#8217;ve been programming for a while now, even if you consider yourself a novice, you&#8217;ve probably run into the SSH (Secure Shell) protocol. Now, don&#8217;t get intimidated by this technical term, this is just another protocol like FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol). So look, you&#8217;ve already engaged with a protocol &hellip; Continue reading \"Generating SSH Keys on MacOSX\"","og_url":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/","og_site_name":"Project Immerse","article_published_time":"2019-11-05T02:46:14+00:00","article_modified_time":"2020-06-15T08:51:04+00:00","og_image":[{"width":750,"height":750,"url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png","type":"image\/png"}],"author":"projectimmerse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"projectimmerse","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#article","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/"},"author":{"name":"projectimmerse","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"headline":"Generating SSH Keys on MacOSX","datePublished":"2019-11-05T02:46:14+00:00","dateModified":"2020-06-15T08:51:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/"},"wordCount":419,"commentCount":0,"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/","url":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/","name":"Generating SSH Keys on MacOSX - Project Immerse","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#primaryimage"},"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png","datePublished":"2019-11-05T02:46:14+00:00","dateModified":"2020-06-15T08:51:04+00:00","author":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"breadcrumb":{"@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#primaryimage","url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png","contentUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2019\/11\/generating-ssh-keys.png","width":750,"height":750,"caption":"Generating SSH Keys on MacOSX"},{"@type":"BreadcrumbList","@id":"https:\/\/www.projectimmerse.com\/blog\/generating-ssh-keys-on-macosx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.projectimmerse.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Generating SSH Keys on MacOSX"}]},{"@type":"WebSite","@id":"https:\/\/www.projectimmerse.com\/blog\/#website","url":"https:\/\/www.projectimmerse.com\/blog\/","name":"Project Immerse","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.projectimmerse.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5","name":"projectimmerse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","caption":"projectimmerse"},"url":"https:\/\/www.projectimmerse.com\/blog\/author\/projectimmerse\/"}]}},"_links":{"self":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/comments?post=915"}],"version-history":[{"count":19,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/915\/revisions"}],"predecessor-version":[{"id":940,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/915\/revisions\/940"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media\/1093"}],"wp:attachment":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media?parent=915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/categories?post=915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/tags?post=915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}