Patch to allow local port forwarding from an existing connection
Markus Friedl
markus at openbsd.org
Thu Sep 20 20:04:42 EST 2001
On Wed, Sep 19, 2001 at 05:04:51PM -0700, Brian Wellington wrote:
> Hi. Attached is a patch that introduces a new escape character (~c) that
> opens a command line. From the command line, a command of the form:
>
> -L port:host:hostport
>
> can be entered, which will forward the local port, as if the same option
> has been provided on the command line. I attempted to allow remote port
> forwards to be specified similarly, but the server disconnects with a
> protocol error (and the code is disabled now).
>
> This is a bit of a hack, but it works, and it's something that I've been
> hoping would be added to ssh for a few years now.
>
> The patch is against openssh-2.9p2.
>
> Comments? Any chance this will get integrated?
> + fprintf(stderr, "\r\n> ");
> + s = fgets(string, sizeof string, stdin);
i don't think reading from stdin is correct.
you need to read from the same FD as bin.
can you get the command line from 'bin' ?
or perhaps use readpass.[ch] from -current with echo enabled?
-m
More information about the openssh-unix-dev
mailing list