-R tunnels

Ángel González keisial at gmail.com
Fri Oct 8 07:40:18 EST 2010

 Nuno Gonçalves wrote:
> After a connection issue, sometimes I get "Warning: remote port
> forwarding failed for listen port" when trying to establish -R
> tunnels, and that is because sshd didn't clear the port binding when
> the connection droped.
> Restarting sshd on the server *doesn't* clear this issue, the port
> remains binded.  Shouldn't a sshd restart solve this?
> Also wouldn't it be reasonable to add a tunnel timeout option to sshd?
> Regards,
> Nuno
The port at the server side is probably in TIME_WAIT. If you wait a few
minutes after the sshd restart, it should be solved. Bear in mind that it
may be the full problem and not disconnection detection. Also, a restart
is probably useless for closing ports forwardings since I think those
are done
after the fork and would thus be unaffected.

More information about the openssh-unix-dev mailing list