{"id":1118,"date":"2015-08-28T12:17:00","date_gmt":"2015-08-28T10:17:00","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=1118"},"modified":"2015-08-28T12:17:00","modified_gmt":"2015-08-28T10:17:00","slug":"ssh-key-for-multiple-servers-single-user","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2015\/08\/28\/ssh-key-for-multiple-servers-single-user\/","title":{"rendered":"ssh key for multiple servers single user"},"content":{"rendered":"<p>You can use an unlimited number of ssh keys per user.<\/p>\n<p>On the same account:<\/p>\n<p>Either specify the key for each ssh or scp command:<\/p>\n<p>For Server 1:<\/p>\n<p>ssh -i ~\/.ssh\/mypvtkey root@pvtserver.com<\/p>\n<p>For Server 2:<\/p>\n<p>ssh -i ~\/.ssh\/mypvtkey root@officeserver.com<\/p>\n<p>Alternately, create ~\/.ssh\/config with the following entries:<\/p>\n<p>Host pvt<br \/>\n     Hostname pvtserver.com<br \/>\n     User root<br \/>\n     Identityfile \/root\/.ssh\/id_rsa_mypvtkey<br \/>\n     Port 22<br \/>\nHost work<br \/>\n     Hostname officeserver.com<br \/>\n     User root<br \/>\n     Identityfile \/root\/.ssh\/id_rsa_myworkkey<br \/>\n     Port 9992<\/p>\n<p>Now, you can connect with: $ssh pvt and $ssh work<\/p>\n<p>You can even do: scp myfile pvt:\/root\/someplace\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use an unlimited number of ssh keys per user. On the same account: Either specify the key for each ssh or scp command: For Server 1: ssh -i ~\/.ssh\/mypvtkey root@pvtserver.com For Server 2: ssh -i ~\/.ssh\/mypvtkey root@officeserver.com Alternately, create ~\/.ssh\/config with the following entries: Host pvt Hostname pvtserver.com User root Identityfile \/root\/.ssh\/id_rsa_mypvtkey Port [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1118","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1118"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1118\/revisions"}],"predecessor-version":[{"id":1119,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1118\/revisions\/1119"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}