{"id":199,"date":"2005-09-06T16:25:36","date_gmt":"2005-09-06T16:25:36","guid":{"rendered":""},"modified":"2005-09-18T10:47:57","modified_gmt":"2005-09-18T09:47:57","slug":"ssh-goodness","status":"publish","type":"post","link":"https:\/\/www.sungate.co.uk\/?p=199","title":{"rendered":"SSH goodness"},"content":{"rendered":"<p>Sometimes you discover stuff that things you&#8217;ve used for years can be made easier to use.  Like <a href=\"http:\/\/www.openssh.org\/\">Open SSH<\/a><br \/>\nfor example.<\/p>\n<p>When connecting to remote hosts, with different usernames and sometimes different ports, you often need to use long-winded command-line options:<\/p>\n<p><pre>\r\nssh username@somehost\r\nssh otherusername@someotherhost\r\nssh -p 1234 yetanotherusername@yetanotherhost\r\n<\/pre>\n<\/p>\n<p>However, you can edit your ~\/.ssh\/config to provide shortcuts for all this:<\/p>\n<p><pre>\r\nHost alias1\r\n  Hostname somehost\r\n  User username\r\nHost alias2\r\n  Hostname someotherhost\r\n  User otherusername\r\nHost alias3\r\n  Hostname yetanotherhost\r\n  User yetanotherusername\r\n  Port 1234\r\n<\/pre>\n<\/p>\n<p>This allows you to simply do:<\/p>\n<p><pre>ssh alias1\r\nssh alias2\r\nssh alias3<\/pre>\n<\/p>\n<p>This also works for scp and sftp, intelligently picking up the appropriate details.  You can always over-ride the defaults if you really need to, of course.<\/p>\n<p>I Can&#8217;t Believe I Never Knew That Before(TM) \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you discover stuff that things you&#8217;ve used for years can be made easier to use. Like Open SSH for example. When connecting to remote hosts, with different usernames and sometimes different ports, you often need to use long-winded command-line options: ssh username@somehost ssh otherusername@someotherhost ssh -p 1234 yetanotherusername@yetanotherhost However, you can edit your ~\/.ssh\/config&#8230;&nbsp;(<a href=\"https:\/\/www.sungate.co.uk\/?p=199\">read more<\/a>)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199"}],"version-history":[{"count":0,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/199\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}