Bug 1403

Summary: ssh ProxyCommand feature
Product: Portable OpenSSH Reporter: Nikola Vladov <v20-123ssh>
Component: sshAssignee: Nikola Vladov <v20-123ssh>
Status: CLOSED WONTFIX    
Severity: enhancement CC: djm, dtucker, openssh-bugs
Priority: P5    
Version: 4.7p1   
Hardware: Other   
OS: Linux   

Description Nikola Vladov 2007-12-18 09:24:43 AEDT
Hi!  Please include in next release of openssh the following trivial
patch to sshconnect.c.  It is useful if some program connects
to the server and exec ssh with open two fd.  In this case there
is no need of ProxyCommand.  I use this with DJB (http://cr.yp.to)
tcpclient.  I have in ~/.ssh/config

Host myhost
HostName 1.2.3.4
...
ProxyCommand -UCSPI 6 7

and I start ssh like:  tcpclinet 1.2.3.4 22 /usr/bin/ssh myhost

With the current ssh configuration in most cases ProxyCommand do only
read/write.  May be other programs use different numbers for
stdin and stdout sockets fd.  Tcpclient user 6 and 7.  One
have can to put the numbers after -UCSPI option.  May be some
line in ssh.1 is also a good idea.

        int pin[2], pout[2];
        pid_t pid;
        char *shell, strport[NI_MAXSERV];

+       if (sscanf(proxy_command, "-UCSPI %d %d", pin, pout) == 2) {
+               packet_set_connection(pout[0], pin[0]);
+               return 0;
+       }

        if ((shell = getenv("SHELL")) == NULL)
                shell = _PATH_BSHELL;

        /* Convert the port number into a string. */
Comment 1 Darren Tucker 2007-12-21 21:45:44 AEDT
I don't see any benefit in doing this.

What value do you get out of using tcpclient this way rather than just running ssh(1)?
Comment 2 Darren Tucker 2008-01-01 03:30:36 AEDT
BTW: assigning the bug to yourself means that any activity on the bug will not go to the mailing list, so most people will never know that it exists.

Adding the mailing list as a CC:.
Comment 3 Darren Tucker 2009-11-20 11:35:31 AEDT
I don't see any reason to do this.
Comment 4 Damien Miller 2010-04-16 15:49:44 AEST
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1