Fri, 12 Mar 2010
I was looking over the release notes for OpenSSH 5.4. Among the list of nice things (key revocation, better passphrase protection, and certificates - though not X.509) in there I noticed support for a new -W option. The manual has this to say about it:
-W host:port
Requests that standard input and output on the client be for-
warded to host on port over the secure channel. Implies -N, -T,
ExitOnForwardFailure and ClearAllForwardings and works with Pro-
tocol version 2 only.
The release notes specifically state:
* Added a 'netcat mode' to ssh(1): "ssh -W host:port ..." This connects stdio on the client to a single port forward on the server. This allows, for example, using ssh as a ProxyCommand to route connections via intermediate servers. bz#1618
That sounds nice and like it will save me from having to do things in a two step process. Normally I have to do ssh -L 7272:gmail-smtp-in.l.google.com:25 syn and use nc localhost -p 7272 or something else in another terminal to get data out through the tunnel. Now with -W it's combined into one simple step.
wxs@ack wxs % ssh -W gmail-smtp-in.l.google.com:25 syn 220 mx.google.com ESMTP 14si5094846qyk.3 EHLO PANTS! 250-mx.google.com at your service, [129.21.50.215] 250-SIZE 35651584 250-8BITMIME 250-ENHANCEDSTATUSCODES 250 PIPELINING
I like things that make my life easier.
posted at: 09:19 | tags: geek | path: /entries/geek | permanent link to this entry








