{"id":137,"date":"2016-08-15T14:24:39","date_gmt":"2016-08-15T12:24:39","guid":{"rendered":"https:\/\/wp.tntnet.eu\/?p=137"},"modified":"2016-09-13T08:04:13","modified_gmt":"2016-09-13T06:04:13","slug":"ssh-key-exchange-between-two-linux-boxes","status":"publish","type":"post","link":"https:\/\/wp.tntnet.eu\/?p=137","title":{"rendered":"SSH key exchange between two linux systems"},"content":{"rendered":"<p>If you work with several different *nix hosts, you will often have to jump from one to another and you have to enter your passwords all over again. Well, there is an easy way to avoid this and at the same time to add some more security to the setup. To be honest, there is more than just one way, but right now we are going to look at the <a href=\"https:\/\/tools.ietf.org\/html\/rfc4252#section-7\">public key authentication method<\/a> to make a ssh login without password possible. We will create a pair of rsa keys as a normal user and transfer the public key to one of our boxes. At the end we will look at the difference between a normal and root user and what we need to establish a ssh login without password for root.<br \/>\nSuggestion before we start: It is possible to secure the private key with a password. This adds more security but the trade-off is that you need to enter the key password before log-on.<\/p>\n<hr \/>\n<p><strong>Example<\/strong>: To demonstrate how to use the above mentioned, we create a pair of keys for the user <em>myuser<\/em> on the <em>host0815<\/em> to establish a ssh login without a password to host <em>host5180<\/em>. The user <em>myuser<\/em> exists on both host systems. The standard ssh port <em>22<\/em> is used by default, if you want to use another port you can change it with the &#8216;<em>-p<\/em>&#8216; switch (e.g. if the ssh daemon listens on port 2222 use: <span class=\"theme:kayote lang:sh decode:true crayon-inline\">ssh \u2013p 2222 myuser@host5180<\/span>).\u00a0Remember, if you operate on a remote computer which is not easy to reach, I would recommend to always run a <span style=\"text-decoration: underline;\">second<\/span> ssh connection in another terminal session.<\/p>\n<ol>\n<li>In order to create the ssh keys, login to <em>host0815<\/em> and create the &#8216;~\/.ssh&#8217; directory with the command <span class=\"theme:kayote lang:sh decode:true crayon-inline\">mkdir -p ~\/.ssh<\/span> and with the command <span class=\"theme:kayote lang:sh decode:true crayon-inline\">chmod 700 ~\/.ssh<\/span>, we restrict the access to the directory to only your user <em>myuser<\/em>. After this, execute the <em>ssh-keygen<\/em> command <span class=\"theme:kayote lang:sh decode:true crayon-inline\">ssh-keygen -t rsa -b 2048<\/span>. With the &#8216;<em>\u2013b&#8217;<\/em> switch it is possible to specify the number of bits in the key (e.g. <em>\u2013b 4096<\/em>). You can enter a password to secure your key or just press enter twice to leave the key \u201cunprotected\u201d. <span id=\"result_box\" class=\"\" lang=\"en\">ssh can either use &#8220;RSA&#8221; (Rivest-Shamir-Adleman) or &#8220;DSA&#8221; (&#8220;Digital Signature Algorithm&#8221;) keys. RSA is often considered the recommended <span class=\"\">choice for<\/span> new keys<span class=\"\"> and it is selected by default (<a href=\"http:\/\/www.openssh.com\/legacy.html\">OpenSSH 7.0 and greater disable the DSA public key algorithm<\/a>).<\/span><\/span>\n<pre class=\"theme:kayote toolbar:2 marking:false ranges:false nums:false nums-toggle:false lang:sh decode:true\">myuser@host0815:\/# mkdir -p ~\/.ssh\r\nmyuser@host0815:\/# chmod 700 ~\/.ssh\r\nmyuser@host0815:\/# ssh-keygen -t rsa -b 2048\r\nGenerating public\/private rsa key pair.\r\nEnter file in which to save the key (\/home\/myuser\/.ssh\/id_rsa):\r\nEnter passphrase (empty for no passphrase):\r\nEnter same passphrase again:\r\nYour identification has been saved in \/home\/myuser\/.ssh\/id_rsa.\r\nYour public key has been saved in \/home\/myuser\/.ssh\/id_rsa.pub.\r\nThe key fingerprint is:\r\nSHA256:1VTYUA+D+7s58s4lGj4nss2sSgxTkSIH5oGOiJ1QcGU myuser@host0815\r\nThe key's randomart image is:\r\n+---[RSA 2048]----+\r\n|.oooE.  ..  oB=  |\r\n|...+..o .. oo .+ |\r\n|o= ..o .. . ..  .|\r\n|+ +    . .  .    |\r\n|      o S    .   |\r\n|       +      .  |\r\n|        o   . ...|\r\n|       .  .=++++ |\r\n|        ..o+*B*o |\r\n+----[SHA256]-----+\r\n<\/pre>\n<\/li>\n<li>Copy the newly created ssh public key to <em>host5180<\/em>:<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">myuser@host0815:\/# ssh-copy-id myuser@host5180<\/span><br \/>\nAfter entering \u00a0the password of <em>myuser@host5180,<\/em> the key is written to<br \/>\n<span class=\"theme:kayote lang:sh highlight:0 decode:true crayon-inline\">~\/.ssh\/authorized_keys<\/span><\/p>\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false lang:sh decode:true\">\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/home\/myuser\/.ssh\/id_rsa.pub\"\r\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\r\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\r\n\r\nNumber of key(s) added: 1<\/pre>\n<p>The operation has worked if the following message is displayed: <em>\u201cNumber of key(s) added: 1\u201d<\/em>.<\/li>\n<li>Finally, test if everything works like expected:\n<ul>\n<li>Try to login with your key to <em>host5180<\/em>.<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">myuser@host0815:\/# ssh myuser@host5180<\/span><\/li>\n<li>If you are prompted for a password (and you didn&#8217;t protect the key with a password) then the key exchange didn&#8217;t work out and you need to check the previous steps (1-3). If you find yourself on the command prompt of <em>host5180<\/em> you managed to established a public key based connection.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>Additional hint<\/strong>: If you want to be able to login from <em>host5180<\/em> to <em>host0815<\/em> in the same way, you have to repeat the steps 1-3 with the two hosts exchanged of course.<\/p>\n<p><span id=\"result_box\" class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\">Now that everything is set up, we can consider disabling the &#8220;normal&#8221; password-based authentication. This has some advantages and disadvantages.<\/span><\/span><\/p>\n<p>Options:<\/p>\n<ol>\n<li style=\"text-align: justify;\">Leave the normal login just like it is.\n<ul>\n<li>Advantage:\n<ul>\n<li>You can log in with both the private key and your normal password. This is especially helpful if you work on a computer without your private key e.g. from your friends PC.<\/li>\n<\/ul>\n<\/li>\n<li>Disadvantage:\n<ul>\n<li>From a security point of view, this adds one more possibility for the bad guys to break into your computer, if they gets hold of your private key.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Disable the password enabled login!\n<ul>\n<li style=\"text-align: justify;\">Advantage:\n<ul>\n<li>This closes the door for brute force attacks against your users passwords.<\/li>\n<\/ul>\n<\/li>\n<li>Disadvantage:\n<ul>\n<li style=\"text-align: justify;\">You can only login from remote if you have your private key with you.<\/li>\n<li style=\"text-align: justify;\">This obviously doesn\u2019t remove the possibility that your key gets stolen and the thief can break into your computer.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><span id=\"result_box\" class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\">At the end<\/span> there is a trade-off between comfort and safety. For maximum safety, we <span class=\"\">turn off the<\/span> password based login and secure our private key with a strong password. <span class=\"\">Keys<\/span> <span class=\"\">without<\/span> a password are for <span class=\"\">the utmost comfort<\/span> <span class=\"\">since they<\/span> <span class=\"\">offer the possibility<\/span> <span class=\"\">to jump from<\/span><span class=\"\"> one computer<\/span> <span class=\"\">to<\/span><span class=\"\"> another <\/span><span class=\"\">without<\/span> entering a <span class=\"\">password<\/span><span class=\"\">.<\/span><br \/>\n<span class=\"\">But the decision<\/span> on safety or comfort has the administrator to take for the system he is responsible of.<\/span><\/p>\n<hr \/>\n<h3>SSH key exchange between two linux boxes for the root user.<\/h3>\n<p>For the root user, you will need a few more steps especially on a stock Ubuntu system, because the root user is disabled and root is not allowed to log in via ssh. Again we use the two hosts <em>host0815<\/em> and <em>host5180<\/em> for the example.<\/p>\n<p><strong>Important<\/strong>: Open a <span style=\"text-decoration: underline;\">second<\/span> ssh connection and keep it open until you know everything works!<\/p>\n<ol>\n<li>Login with your normal user to <em>host0815<\/em> and become root with the following command:<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">myuser@host0815:\/# sudo su \u2013<\/span><\/li>\n<li>Create the ssh key pair:\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false lang:sh mark:3 decode:true\">root@host0815:\/# mkdir ~\/.ssh\r\nroot@host0815:\/# chmod 700 ~\/.ssh\r\nroot@host0815:\/# ssh-keygen -t rsa -b 4096<\/pre>\n<\/li>\n<li><span id=\"result_box\" class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\">Now we<\/span> copy the newly generated ssh key to <em>host5180. <\/em>As already mentioned, there is a <span class=\"alt-edited\">specialty<\/span><\/span><span id=\"result_box\" lang=\"en\" tabindex=\"-1\"> <\/span><span id=\"result_box\" class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\">for the<\/span> root <span class=\"\">user: the<\/span> password based ssh login on many linux <span class=\"\">systems<\/span> is disabled by default for root.<br \/>\nSo we will look at how to activate it temporarily to be able to copy our public key to <em>host5180<\/em>.<\/span><span class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\" lang=\"en\" tabindex=\"-1\"><br \/>\n<\/span><\/span><\/p>\n<ol>\n<li>Login with your normal user to <em>host5180<\/em> and use <em>sudo<\/em> to become root with the following command:<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">myuser@host5180:\/# sudo su \u2013<\/span><\/li>\n<li>Activate the root user by setting a password with the command <em>passwd<\/em>:\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false lang:sh decode:true\">root@host5180:~# passwd\r\nNew password:\r\nRetype new password:\r\npasswd: password updated successfully<\/pre>\n<\/li>\n<li>Open the config file &#8220;\/etc\/ssh\/sshd_config&#8221; with your editor of choice and search for \u201c<em>PermitRootLogin without-password<\/em>\u201d, comment the line out by adding &#8216;#&#8217; in front of it and add <em>&#8220;PermitRootLogin yes&#8221;<\/em> in the line below:\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false lang:sh decode:true\"># PermitRootLogin prohibit-password\r\nPermitRootLogin yes<\/pre>\n<p>This will enable the root ssh login with the password we have just set up.<\/li>\n<li>Save the file and restart the ssh daemon. <span style=\"text-decoration: underline;\">Check that your second ssh connection is still open<\/span><span style=\"text-decoration: underline;\">!<\/span><br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">root@host5180:\/# systemctl restart sshd.service<\/span><br \/>\nor<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">root@host5180:\/# service sshd restart<\/span><\/li>\n<li>Now go back to <em>host0815<\/em> and test if root can login to <em>host5180<\/em>:<em><br \/>\n<\/em><span class=\"theme:kayote toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false show-title:false striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false plain:false plain-toggle:false copy:false popup:false expand-toggle:false decode-attributes:false mixed:false lang:sh decode:true show_mixed:false crayon-inline\">root@host0815:\/# ssh root@host5180 date<\/span><br \/>\nAfter entering the root password date and time should be displayed as a result. If this didn&#8217;t work out check the the previous steps (3.1-3.5).<\/li>\n<\/ol>\n<p><span class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\" lang=\"en\" tabindex=\"-1\">After this little excursion we can now copy the public key to <em>host5180<\/em>:<em><br \/>\n<\/em><\/span><\/span><span class=\"theme:kayote lang:sh decode:true crayon-inline\">root@host0815:\/# ssh-copy-id root@host5180<\/span><br \/>\nIn my opinion, this is the easiest\/best way to copy the public key to a host but of course there are other ways to do this<span id=\"result_box\" class=\"\" lang=\"en\" tabindex=\"-1\">, for example use a USB stick, scp, etc.<\/span><\/li>\n<li><span class=\"\" lang=\"en\" tabindex=\"-1\"><span class=\"\" lang=\"en\" tabindex=\"-1\">Test if everything works:<br \/>\n<\/span><\/span><\/p>\n<ol>\n<li>Try to login with your shiny new key to <em>host5180<\/em>:<br \/>\n<span class=\"theme:kayote lang:sh decode:true crayon-inline\">root@host0815:\/# ssh root@host5180<\/span><\/li>\n<li>If you are prompted for a password the key exchange didn\u2019t work out and you have to re-check the previous steps (1-4).<\/li>\n<\/ol>\n<\/li>\n<li>Finally change the \u201c<em>PermitRootLogin yes<\/em>\u201d back to \u201c<em>PermitRootLogin without-password<\/em>\u201d in the config file &#8216;\/etc\/ssh\/sshd_config&#8217; and restart the ssh daemon (see 3.4).<\/li>\n<li>Disable the root user again if you like:\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false lang:sh decode:true\">myuser@host5180:\/# sudo passwd -l root<\/pre>\n<\/li>\n<\/ol>\n<p style=\"text-align: center;\"><em>Step 5 and 6 are not necessary but recommended.<\/em><\/p>\n<hr \/>\n<p><strong>Additional hint<\/strong>:<\/p>\n<p>It is possible to change single settings only for individual users, e.g.:<\/p>\n<pre class=\"theme:kayote toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false wrap-toggle:false lang:sh decode:true\">DenyUsers user0815\r\nMatch User myuser\r\n    PasswordAuthentication no<\/pre>\n<ul>\n<li><span id=\"result_box\" class=\"\" lang=\"en\"><span class=\"\">Prohibits<\/span> <span class=\"\">ssh access<\/span> <span class=\"\">for the user<\/span> <em><span class=\"\">user<\/span><span class=\"\">0815<\/span><\/em><\/span><\/li>\n<li><span id=\"result_box\" class=\"\" lang=\"en\"><span class=\"\">Disables<\/span> password authentication for user <em><span class=\"\">myuser<\/span><\/em><\/span><\/li>\n<li><span id=\"result_box\" class=\"\" lang=\"en\"> <span class=\"\">For all other<\/span> <span class=\"\">users<\/span><span class=\"\">, the<\/span> <span class=\"\">password authentication<\/span> is maintained.<\/span><\/li>\n<\/ul>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you work with several different *nix hosts, you will often have to jump from one to another and you have to enter your passwords all over again. Well, there is an easy way to avoid this and at the same time to add some more security to the setup. To be honest, there is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[21,24,20,22,23],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-ssh","tag-permitrootlogin","tag-public-key-authentication","tag-ssh","tag-ssh-copy-id","tag-ssh-keygen"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"The article shows the process to establish a password free ssh connection between multiple *nix systems.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Thorsten\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/wp.tntnet.eu\/?p=137\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#article\",\"name\":\"How to setup ssh public key authentication | tntnet.eu\",\"headline\":\"SSH key exchange between two linux systems\",\"author\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Thorsten\"},\"datePublished\":\"2016-08-15T14:24:39+02:00\",\"dateModified\":\"2016-09-13T08:04:13+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#webpage\"},\"articleSection\":\"SSH, PermitRootLogin, public key authentication, SSH, ssh-copy-id, ssh-keygen\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wp.tntnet.eu\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?cat=19#listItem\",\"name\":\"SSH\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?cat=19#listItem\",\"position\":2,\"name\":\"SSH\",\"item\":\"https:\\\/\\\/wp.tntnet.eu\\\/?cat=19\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#listItem\",\"name\":\"SSH key exchange between two linux systems\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#listItem\",\"position\":3,\"name\":\"SSH key exchange between two linux systems\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?cat=19#listItem\",\"name\":\"SSH\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/#person\",\"name\":\"Thorsten\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Thorsten\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?author=2#author\",\"url\":\"https:\\\/\\\/wp.tntnet.eu\\\/?author=2\",\"name\":\"Thorsten\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Thorsten\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#webpage\",\"url\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137\",\"name\":\"How to setup ssh public key authentication | tntnet.eu\",\"description\":\"The article shows the process to establish a password free ssh connection between multiple *nix systems.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?p=137#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/?author=2#author\"},\"datePublished\":\"2016-08-15T14:24:39+02:00\",\"dateModified\":\"2016-09-13T08:04:13+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/#website\",\"url\":\"https:\\\/\\\/wp.tntnet.eu\\\/\",\"name\":\"tntnet.eu\",\"description\":\"* Just another IT blog *\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/wp.tntnet.eu\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to setup ssh public key authentication | tntnet.eu","description":"The article shows the process to establish a password free ssh connection between multiple *nix systems.","canonical_url":"https:\/\/wp.tntnet.eu\/?p=137","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wp.tntnet.eu\/?p=137#article","name":"How to setup ssh public key authentication | tntnet.eu","headline":"SSH key exchange between two linux systems","author":{"@id":"https:\/\/wp.tntnet.eu\/?author=2#author"},"publisher":{"@id":"https:\/\/wp.tntnet.eu\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/wp.tntnet.eu\/?p=137#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g","width":96,"height":96,"caption":"Thorsten"},"datePublished":"2016-08-15T14:24:39+02:00","dateModified":"2016-09-13T08:04:13+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/wp.tntnet.eu\/?p=137#webpage"},"isPartOf":{"@id":"https:\/\/wp.tntnet.eu\/?p=137#webpage"},"articleSection":"SSH, PermitRootLogin, public key authentication, SSH, ssh-copy-id, ssh-keygen"},{"@type":"BreadcrumbList","@id":"https:\/\/wp.tntnet.eu\/?p=137#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu#listItem","position":1,"name":"Home","item":"https:\/\/wp.tntnet.eu","nextItem":{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu\/?cat=19#listItem","name":"SSH"}},{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu\/?cat=19#listItem","position":2,"name":"SSH","item":"https:\/\/wp.tntnet.eu\/?cat=19","nextItem":{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu\/?p=137#listItem","name":"SSH key exchange between two linux systems"},"previousItem":{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu\/?p=137#listItem","position":3,"name":"SSH key exchange between two linux systems","previousItem":{"@type":"ListItem","@id":"https:\/\/wp.tntnet.eu\/?cat=19#listItem","name":"SSH"}}]},{"@type":"Person","@id":"https:\/\/wp.tntnet.eu\/#person","name":"Thorsten","image":{"@type":"ImageObject","@id":"https:\/\/wp.tntnet.eu\/?p=137#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g","width":96,"height":96,"caption":"Thorsten"}},{"@type":"Person","@id":"https:\/\/wp.tntnet.eu\/?author=2#author","url":"https:\/\/wp.tntnet.eu\/?author=2","name":"Thorsten","image":{"@type":"ImageObject","@id":"https:\/\/wp.tntnet.eu\/?p=137#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/63a089d9d08b03b4a74169ba6b7f557413e66b684b37eb567c188168987e0d21?s=96&d=mm&r=g","width":96,"height":96,"caption":"Thorsten"}},{"@type":"WebPage","@id":"https:\/\/wp.tntnet.eu\/?p=137#webpage","url":"https:\/\/wp.tntnet.eu\/?p=137","name":"How to setup ssh public key authentication | tntnet.eu","description":"The article shows the process to establish a password free ssh connection between multiple *nix systems.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/wp.tntnet.eu\/#website"},"breadcrumb":{"@id":"https:\/\/wp.tntnet.eu\/?p=137#breadcrumblist"},"author":{"@id":"https:\/\/wp.tntnet.eu\/?author=2#author"},"creator":{"@id":"https:\/\/wp.tntnet.eu\/?author=2#author"},"datePublished":"2016-08-15T14:24:39+02:00","dateModified":"2016-09-13T08:04:13+02:00"},{"@type":"WebSite","@id":"https:\/\/wp.tntnet.eu\/#website","url":"https:\/\/wp.tntnet.eu\/","name":"tntnet.eu","description":"* Just another IT blog *","inLanguage":"en-US","publisher":{"@id":"https:\/\/wp.tntnet.eu\/#person"}}]}},"aioseo_meta_data":{"post_id":"137","title":"How to setup ssh public key authentication | #site_title","description":"The article shows the process to establish a password free ssh connection between multiple *nix systems.","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-02-21 09:47:18","updated":"2022-09-13 14:24:25","seo_analyzer_scan_date":null},"_links":{"self":[{"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137"}],"version-history":[{"count":64,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.tntnet.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}