{"id":2915,"date":"2014-08-28T08:06:37","date_gmt":"2014-08-28T12:06:37","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=2915"},"modified":"2014-08-28T08:06:38","modified_gmt":"2014-08-28T12:06:38","slug":"tramp-with-multiple-hops","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=2915","title":{"rendered":"Tramp with Multiple Hops"},"content":{"rendered":"<p> The Emacs Tramp package is a wonderful thing. With it, you can easily edit files on remote machines in a virtually transparent fashion. Most Emacs users are familiar with Tramp and use it to edit files on machines on the local network or on remote-network machines directly reachable on the Internet. Often times, though, those remote-network machines are not directly reachable. <\/p>\n<p> A typical example occurs when a developer is working from home and needs to access a machine on his work network that is protected by a firewall. Emacs, of course, can also handle this case. The normal way is to set rules for how to reach remote-network hosts in your <code>.emacs<\/code> or <code>init.el<\/code> file. The rules are a bit complex but are documented in the <a href=\"http:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/tramp\/Multi_002dhops.html#Multi_002dhops\">Tramp manual<\/a>. Sometimes, though, you just want a one-off access to some protected host and it&#8217;s a pain to temporarily add Tramp configuration rules for it. <\/p>\n<p> Fortunately, David V\u00e1zquez has tweeted the answer: <\/p>\n<blockquote class=\"twitter-tweet\" lang=\"en\">\n<p><a href=\"https:\/\/twitter.com\/hashtag\/emacs?src=hash\">#emacs<\/a> tramp multi-hops: edit \/path in remotehost, using bastion as a proxy.&#10; C-x C-f \/ssh:bird@bastion|ssh:you@remotehost:\/path&#10;wow!<\/p>\n<p>&mdash; David V\u00e1zquez (@davazp) <a href=\"https:\/\/twitter.com\/davazp\/statuses\/499520097703452672\">August 13, 2014<\/a><\/p><\/blockquote>\n<p> <script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>  <\/p>\n<p> Unless you need to repeatedly access some remote host, this is a much easier method. The tweet tells you just about everything you need to know but you can <a href=\"http:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/tramp\/Ad_002dhoc-multi_002dhops.html#index-multi_002dhop_002c-ad_002dhoc-181\">see the details<\/a> in the Tramp documentation. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Emacs Tramp package is a wonderful thing. With it, you can easily edit files on remote machines in a virtually transparent fashion. Most Emacs users are familiar with Tramp and use it to edit files on machines on the &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=2915\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-2915","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2915"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2915\/revisions"}],"predecessor-version":[{"id":2916,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2915\/revisions\/2916"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}