background later?

Peter Meerwald pmeerw at pmeerw.net
Mon Jul 15 20:41:51 WST 2013


Hello,

I want to use dropbear just to setup port forwarding and then drop to the 
background, e.g. like so

ssh -f -N -T -y -K 20 -I 7200 -R 22222:localhost:22 remote.host.com

the problem is that the code to background dropbear (in cli-session.c, 
line 253) is before the setup of the port forwarding (just a few lines 
down)

so in case port forwarding setup fails, the caller of ssh has no way to 
find out that port forwarding failed by checking the exit code

I think the code to background dropbear should be be delayed until local 
and remote port forwarding has succedded (esp. in -N is given)

for remote connection this is somewhat tricky as the remote host has to 
open the ports and confirm back; so the backgrounding would need to go 
into cli_recv_msg_request_success() after having processed the last remote 
forward port in the list

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)


More information about the Dropbear mailing list