bugzilla-daemon at mindrot.org
2003-Nov-22 20:13 UTC
[Bug 762] ssh does not exit if local port could not be bound with options -L and -N
http://bugzilla.mindrot.org/show_bug.cgi?id=762 Summary: ssh does not exit if local port could not be bound with options -L and -N Product: Portable OpenSSH Version: 3.7.1p1 Platform: ix86 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: ssh AssignedTo: openssh-bugs at mindrot.org ReportedBy: jeremyp8 at hotmail.com When ssh is run to create an ssh tunnel and to do nothing else, it does not exit if the local port is already in use. I tried a few different command lines to make sure that ssh was aware that I was only trying to create a tunnel. I hoped that if the tunnel could not be established completely, ssh would exit with an error status. This is important to programs and scripts that use ssh to only create tunnels. I tried the following: $ ./ssh -n -a -N -L 80:localhost:17 remote bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 80 Could not request local forwarding. $ ./ssh -f -a -N -L 80:localhost:17 remote bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 80 Could not request local forwarding. $ ps jeremyp 25826 0.0 0.2 3112 1628 ? S 15:08 0:00 ./ssh -f -a -N -L 80:localhost:17 remote In the first example, I had to C-c out... in the second, the process still appears in ps output. I'm not sure whether this is a minor bug or an enhancement. It seems that ssh should always exit if what it was able to setup cannot be used and it has nothing else to do (I can't use the tunnel without a local port to connect to). ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.