{"id":489,"date":"2014-08-18T11:59:59","date_gmt":"2014-08-18T18:59:59","guid":{"rendered":"http:\/\/10.43.101.63:24469\/?p=489"},"modified":"2017-02-21T00:45:49","modified_gmt":"2017-02-21T08:45:49","slug":"ssh-proxying-via-vpn-gateway-using-netcat","status":"publish","type":"post","link":"https:\/\/aarontc.com\/archive\/2014\/08\/ssh-proxying-via-vpn-gateway-using-netcat\/","title":{"rendered":"SSH Proxying Via VPN Gateway Using NetCat"},"content":{"rendered":"

Unsurprisingly, the swiss army knife that is *NIX can solve an amazing array of problems without much fuss. For the past few years, I’ve needed to SSH into any of an array of machines behind many remote NAT routers. I’ve been getting by, until now, by directly SSHing to the router on the network I needed into, then SSHing again into the target machine. This is annoying at best, and error-prone at worst. Thanks to a CERN article<\/a>, I’ve learned a better way…<\/p>\n

All it takes is a client-side SSH .config<\/code> file modification, like so:<\/p>\n

\r\nHost gateway\r\n\tHostname vpn-concentrator.yourdomain.com\r\n\r\nHost *.myvwan.com\r\n\tControlPath ~\/.ssh\/%h.%p.%r\r\n\tControlMaster auto\r\n\tForwardAgent yes\r\n\tGSSAPITrustDNS no\r\n\tProxyCommand ssh gateway \/usr\/bin\/nc %h %p 2> \/dev\/null\r\n<\/pre>\n

This configures SSH to use NetCat on the alias gateway<\/code> to reach any destination ending with .myvwan.com<\/code>. Quite easy to set up, requires no scripting or extra package installations, and makes all my SSHing easier!<\/p>\n","protected":false},"excerpt":{"rendered":"

Unsurprisingly, the swiss army knife that is *NIX can solve an amazing array of problems without much fuss. For the past few years, I’ve needed to SSH into any of an array of machines behind many remote NAT routers. I’ve been getting by, until now, by directly SSHing to the router on the network I […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6PV8H-7T","jetpack-related-posts":[{"id":128,"url":"https:\/\/aarontc.com\/archive\/2010\/05\/updated-about-page-and-added-likes\/","url_meta":{"origin":489,"position":0},"title":"Updated About Page and Added Likes","author":"Aaron","date":"May 14, 2010","format":false,"excerpt":"I've updated the about page and added a \"Likes\" feature so visitors can indicate the usefulness of my content. Check out the updated page if you're curious :) The \"Likes\" feature is courtesy of the WP-Likes plugin. Thanks, Aakash Bapna.","rel":"","context":"In "Site News"","block_context":{"text":"Site News","link":"https:\/\/aarontc.com\/archive\/category\/site-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":434,"url":"https:\/\/aarontc.com\/archive\/2013\/11\/open-source-project-of-the-month-kiwiirc\/","url_meta":{"origin":489,"position":1},"title":"Open Source Project of the Month: KiwiIRC","author":"Aaron","date":"November 27, 2013","format":false,"excerpt":"I think I'll start writing about some of my favorite open source projects. If time permits, this'll be a monthly thing. Not only to get some exposure for great projects, but to have a nice list of great projects I can refer to others easily. KiwiIRC As the very first\u2026","rel":"","context":"In "Project of the Month"","block_context":{"text":"Project of the Month","link":"https:\/\/aarontc.com\/archive\/category\/project-of-the-month\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14,"url":"https:\/\/aarontc.com\/archive\/2010\/04\/new-blog\/","url_meta":{"origin":489,"position":2},"title":"New Blog","author":"Aaron","date":"April 20, 2010","format":false,"excerpt":"After over 3 years of not having time to finish developing the frontend to my custom blog software, I've decided to use a prebuilt solution. I think some of the concepts I came up with during the development of my old blog software still have merit, and I'll add the\u2026","rel":"","context":"In "Site News"","block_context":{"text":"Site News","link":"https:\/\/aarontc.com\/archive\/category\/site-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":315,"url":"https:\/\/aarontc.com\/archive\/2011\/12\/linux-is-not-windows\/","url_meta":{"origin":489,"position":3},"title":"Linux is Not Windows","author":"Aaron","date":"December 18, 2011","format":false,"excerpt":"Yesterday, Mark pointed me at the following article, which I feel is quite relevant to most Linux versus Windows debates that go on these days. In particular, the analogies of cars versus motorbikes, and paid support (no community) versus free support (community), seem to do a fantastic job of explaining\u2026","rel":"","context":"In "Linux"","block_context":{"text":"Linux","link":"https:\/\/aarontc.com\/archive\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/posts\/489"}],"collection":[{"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":7,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":604,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/posts\/489\/revisions\/604"}],"wp:attachment":[{"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aarontc.com\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}