Service Setup (Ubuntu)
Under current Ubuntu (10.04) you can create an Upstart job to run the setup script:
$ cat /etc/init/autoforward.conf
# autoforward - automatic SSH forwarding
description "automatic SSH forwarding"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /usr/local/bin/setup-ssh-forwards
It should not be executable. You can start it as follows:
$ sudo initctl start autoforward
autoforward start/running, process 11590