Programmatically adding port forwardings -- how?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

is there a way for a program to add port forwardings to an
existing ssh connection when that ssh process gets its stdin
via a pipe from this program?

I found that the program can transmit ~C to the stdin of the
ssh process. Ssh then displays the ssh> promt. But it seems
to expect the command line from /dev/tty.

How can I feed the "-L x:y:z" command line to ssh from my
program (e.g. convince ssh to read from stdin rather than

Kind regards

Ingolf Steinbach                       Jena-Optronik GmbH       ++49 3641 200-147
PGP: 0x7B3B5661  213C 828E 0C92 16B5  05D0 4D5B A324 EC04

Re: Programmatically adding port forwardings -- how?

Quoted text here. Click to load it

There's an enhancement request with patch to do it over the control

Quoted text here. Click to load it

I think you'd have to modify ssh.

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Site Timeline