Patch to allow local port forwarding from an existing connection

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Thu Sep 20 23:17:16 EST 2001



On Thu, 20 Sep 2001, Markus Friedl wrote:

> 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?
>

Ermm.. I'm leary of this.  By using readpass.[ch] base code with echo on.
Can I be assured that no one can send control characters down my ssh pipe
and enable new forwardings without my consent?  I can just see people
embeding stuff into an email as a form of attack.

- Ben




More information about the openssh-unix-dev mailing list