It would be quite helpful to have an option that allows you to connect to a socket on the remote machine. This would make it trivial to run SSH to tunnel $PROTO in an application, currently I call nc on the remote machine but that's another required tool.
Created attachment 1659 [details] Implement stdio passthrough port forward mode Actually I wrote something like that about a year ago but never published it because although it worked well enough for my purpose it didn't close connections cleanly. I've dusted off the patch, tidied it up and fixed the problem with the channel close. With the attached patch, ssh -W hostb:port hosta should be functionally equivalent to ssh hosta netcat hostb port Works in my limited testing (ie a couple of times, just now).
Created attachment 1660 [details] Implement stdio passthrough port forward mode Prevent interaction with other port forwards by always clearing them, plus make the argument handling slightly less hacky.
*** Bug 1661 has been marked as a duplicate of this bug. ***
This mode would be really, really useful if it could be passed over the multiplexing socket. Of course, that would probably require that we support passing other forwards too. Just sayin' :)
I'd like to see this in 5.4
This has been committed and will be in the 5.4 release. Thanks.
Support for opening stdio forwards over multiplexed sessions has just been committed too and will be in OpenSSH 5.4.
With the release of 5.4p1, this bug is now considered closed.