<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-2702375333459621122.post5341456696397269966..comments</id><updated>2011-08-31T05:28:52.816+01:00</updated><title type='text'>Comments on Roland Schulz: SSH ProxyCommand without netcat</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.rschulz.eu/feeds/5341456696397269966/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html'/><author><name>Roland</name><uri>http://www.blogger.com/profile/15007027365887236970</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://lh6.google.com/image/rolandschulzhd/RRWIgFQkABI/AAAAAAAAATI/Bepsc0QOg5I/P1010721.JPG?imgdl=1'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-3627424463201071880</id><published>2011-06-03T05:57:39.285+01:00</published><updated>2011-06-03T05:57:39.285+01:00</updated><title type='text'>I came across this having the problem of no netcat...</title><content type='html'>I came across this having the problem of no netcat on the gateway, but unfortunately it has no /dev/tcp either.&lt;br /&gt;&lt;br /&gt;I did nonetheless eventually find a solution!  See, there _was_ a copy of netcat on the final target, and I could use that with an extra ssh hop:&lt;br /&gt;&lt;br /&gt;ProxyCommand ssh {gw} ssh {host} netcat -w1 {host} 22.&lt;br /&gt;&lt;br /&gt;It does end up with an extraneous loopback from the target to itself, but otherwise seems to work.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3627424463201071880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3627424463201071880'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1307077059285#c3627424463201071880' title=''/><author><name>Brooks</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-991296234'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-3524663534140800022</id><published>2011-03-03T01:31:26.990Z</published><updated>2011-03-03T01:31:26.990Z</updated><title type='text'>I updated the post to make it more clear. Yes you ...</title><content type='html'>I updated the post to make it more clear. Yes you can use %h if that is the valid hostname. gw is the gateway you use as intermediary machine. And you need to make sure you use bash with /dev/tcp enabled.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3524663534140800022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3524663534140800022'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1299115886990#c3524663534140800022' title=''/><author><name>Roland Schulz</name><uri>http://www.blogger.com/profile/03817400543978969432</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1382961324'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-6921102376680103250</id><published>2011-03-03T00:34:52.877Z</published><updated>2011-03-03T00:34:52.877Z</updated><title type='text'>I am sorry to bump up an old post, I am trying you...</title><content type='html'>I am sorry to bump up an old post, I am trying your solution with a slightly different approach, but doesn&amp;#39;t seem to work and it&amp;#39;s mainly because I don&amp;#39;t think I understand the proxy command line correctly.&lt;br /&gt;&lt;br /&gt;What&amp;#39;s the {gw} string? and is the {host} the same as the %h variable?&lt;br /&gt;&lt;br /&gt;And on a second note /dev/tcp directory doesn&amp;#39;t exist either on my local or remote machine during an ssh connection.&lt;br /&gt;&lt;br /&gt;Is it possible to explain the expression with the exec:&lt;br /&gt;exec 3&amp;lt;&amp;gt;/dev/tcp/{host}/22&lt;br /&gt;&lt;br /&gt;My setup looks something like this:&lt;br /&gt;&lt;br /&gt;Host proxy&lt;br /&gt;Hostname proxy.server.com&lt;br /&gt;User myuser&lt;br /&gt;DynamicForward localhost:3128&lt;br /&gt;&lt;br /&gt;Host *.server.com&lt;br /&gt;ProxyCommand /usr/bin/nc -x localhost:3128 -Pmyseconduser %h %p&lt;br /&gt;&lt;br /&gt;In a perfect world, I&amp;#39;d ssh to proxy, then ssh in another console to the dev.server.com, and use proxy to browse the same server on ports 80 and 3000&lt;br /&gt;&lt;br /&gt;The problem is that proxy doesn&amp;#39;t have netcat installed. so no nc love there.&lt;br /&gt;&lt;br /&gt;Any help that allows me to rewrite this trick and adapt it to my context would be appreciated.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/6921102376680103250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/6921102376680103250'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1299112492877#c6921102376680103250' title=''/><author><name>placidrage</name><uri>http://www.blogger.com/profile/15469224783706208356</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-597237373'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-8782586049541713860</id><published>2009-10-22T23:41:08.053+01:00</published><updated>2009-10-22T23:41:08.053+01:00</updated><title type='text'>Closeing the file descriptor doesn&amp;#39;t exit the ...</title><content type='html'>Closeing the file descriptor doesn&amp;#39;t exit the background cat for me. But your comment made me realized one can just kill the background cat after the connection is finished. Thanks. I updated it in the article.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/8782586049541713860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/8782586049541713860'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1256251268053#c8782586049541713860' title=''/><author><name>Roland</name><uri>http://www.blogger.com/profile/15007027365887236970</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://lh6.google.com/image/rolandschulzhd/RRWIgFQkABI/AAAAAAAAATI/Bepsc0QOg5I/P1010721.JPG?imgdl=1'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1724747442'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-3099596630242829974</id><published>2009-10-22T19:08:35.244+01:00</published><updated>2009-10-22T19:08:35.244+01:00</updated><title type='text'>How about closing the file descriptor #3 after eve...</title><content type='html'>How about closing the file descriptor #3 after everything was done? Will this work? --&lt;br /&gt;ProxyCommand ssh {gw} &amp;#39;exec 3&amp;lt;&amp;gt;/dev/tcp/{host}/22;(cat &amp;lt;&amp;amp;3 &amp;amp; );cat &amp;gt;&amp;amp;3; &lt;b&gt;&lt;i&gt;exec 3&amp;gt;&amp;amp;-&lt;/i&gt;&lt;/b&gt;;&amp;#39;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3099596630242829974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/3099596630242829974'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1256234915244#c3099596630242829974' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-87194712'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-4525149076421265502</id><published>2009-08-05T17:21:35.480+01:00</published><updated>2009-08-05T17:21:35.480+01:00</updated><title type='text'>Yes, it leaves one cat around. Didn&amp;#39;t worry ab...</title><content type='html'>Yes, it leaves one cat around. Didn&amp;#39;t worry about it. Not sure how one could prevent that.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/4525149076421265502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/4525149076421265502'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1249489295480#c4525149076421265502' title=''/><author><name>Roland</name><uri>http://www.blogger.com/profile/15007027365887236970</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://lh6.google.com/image/rolandschulzhd/RRWIgFQkABI/AAAAAAAAATI/Bepsc0QOg5I/P1010721.JPG?imgdl=1'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1724747442'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-310043354845080092</id><published>2009-08-05T16:07:28.233+01:00</published><updated>2009-08-05T16:07:28.233+01:00</updated><title type='text'>Not bad the idea, but for me that leaves one idle ...</title><content type='html'>Not bad the idea, but for me that leaves one idle cat around after teminating the connection.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/310043354845080092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/310043354845080092'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1249484848233#c310043354845080092' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1306620134'/></entry><entry><id>tag:blogger.com,1999:blog-2702375333459621122.post-6676753937757060366</id><published>2008-10-23T09:28:00.000+01:00</published><updated>2008-10-23T09:28:00.000+01:00</updated><title type='text'>That is one great trick, I'll try this one on diff...</title><content type='html'>That is one great trick, I'll try this one on different UNIX/Linux systems! Thanks for this hint!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/6676753937757060366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2702375333459621122/5341456696397269966/comments/default/6676753937757060366'/><link rel='alternate' type='text/html' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html?showComment=1224750480000#c6676753937757060366' title=''/><author><name>Robert de Bock</name><uri>http://meinit.nl/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.rschulz.eu/2008/09/ssh-proxycommand-without-netcat.html' ref='tag:blogger.com,1999:blog-2702375333459621122.post-5341456696397269966' source='http://www.blogger.com/feeds/2702375333459621122/posts/default/5341456696397269966' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1541868069'/></entry></feed>
