SSH Multiplexing w/ no controlling TTY

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

Threaded View

I am very excited about the multiplexing option in the latest versions of
OpenSSH.  I currently have a script that starts at boot time for remote
machine to connect back to my SSH "concentrator".  From the existing
connections we create tunnels to get be able to get to and from the machine
back to our central facility.  I would like to use this new feature to get a
speed increase as the authentication doesn' have to happen every time.

My problem is, I can run

SSH Multiplexing w/ no controlling TTY

Re: SSH Multiplexing w/ no controlling TTY

bah, stupid <ctrl> + <enter>

My problem is that i can run the ssh command in the foreground, but whenever
i try to run it in the background from a start up script it fails.  Now,
back when we first put this c program together, it was because ssh didn't
like being called w/o a controlling TTY and the disable psuedo tty option
fixed this.  Now it feels like i am getting the same issue just with this
new feature.

/usr/bin/ssh -v -v -T -P -M -S
tmp/vpn-user.remote-mux -2 -lvpn-user  -cblowfish -L3306: -p22

is the command we are using (using pubkey authentication).  It works from
the foreground but failes if done from the background.

The closest i have gotten to an error message is

ssh_control_listener() bind: No such file or directory

any thoughts?

Quoted text here. Click to load it

Re: SSH Multiplexing w/ no controlling TTY

just to make sure i am being somewhat coherant.

I have a C program that forks and calls the ssh.  In the event the ssh
connection goes down it loops and starts again (very basic script).  Normaly
STDIN & STDOUT of the fork process is piped away, but when i remove this and
let the info go to STDIN i see the following.

/usr/bin/ssh -M -S
/tmp/vpn-user.remote-mux -a -P -2 -lvpn-user -p22 -cblowfish
 -R1236: -R11236:
ssh_control_listener bind(): No such file or directory

If i run the same command from the foreground it works just fine.  Forking
allows me to simulate what happens when i run this from a start up script.

Re: SSH Multiplexing w/ no controlling TTY

hmmm nevermind.  This has nothing to do with controlling TTY's and more to
do with my lack paying attention to the excel() C function.

I had been combining parameters, so the c program was interpreting "-S
/path/file -P" as one parameter and therefore the full filename.

Site Timeline