[SLUG] Port forwarding

Stephen O'Neill soneill84 at yahoo.co.uk
Mon Sep 24 19:47:04 BST 2007


Hey guys,

If you haven't experienced port forwarding then you may wish to stop 
reading.

I use SSH to tunnel connections between home and work. To do this I SSH 
from work to home; setup server-side port forwards initiated from work; 
use the now open ports from home to connect to work.

The problem I have is that if my work machine disconnects then the port 
forwards remain in place. When my work machine reconnects I get errors 
in /var/log/auth.log saying that the port-forward request was denied and 
the ssh session is disconnected.

I have searched and searched but cannot find out how to either:

a) Automatically remove the port forwarding on disconnects

b) Manually remove them without restarting sshd or rebooting my home 
machine.

This must be possible but I just don't have the experience. Can anyone 
offer any pointers?

Thanks,

Steve O





More information about the Scarborough mailing list