Bug 1618

Summary: Option to connect tty to a socket
Product: Portable OpenSSH Reporter: darius
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm, dtucker, sfandino
Priority: P2    
Version: 5.1p1   
Hardware: Other   
OS: FreeBSD   
Bug Depends on:    
Bug Blocks: 1626    
Attachments:
Description Flags
Implement stdio passthrough port forward mode
none
Implement stdio passthrough port forward mode none

Description darius 2009-07-01 17:41:26 AEST
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.
Comment 1 Darren Tucker 2009-07-02 21:57:30 AEST
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).
Comment 2 Darren Tucker 2009-07-02 22:36:17 AEST
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.
Comment 3 Darren Tucker 2009-10-21 10:46:25 AEDT
*** Bug 1661 has been marked as a duplicate of this bug. ***
Comment 4 Damien Miller 2009-10-21 21:47:50 AEDT
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' :)
Comment 5 Darren Tucker 2010-01-05 16:51:52 AEDT
I'd like to see this in 5.4
Comment 6 Darren Tucker 2010-01-11 12:41:36 AEDT
This has been committed and will be in the 5.4 release.  Thanks.
Comment 7 Damien Miller 2010-01-26 12:34:39 AEDT
Support for opening stdio forwards over multiplexed sessions has just been committed too and will be in OpenSSH 5.4.
Comment 8 Darren Tucker 2010-03-26 10:51:07 AEDT
With the release of 5.4p1, this bug is now considered closed.