Starting SSH Reverse tunnelling at boot
Hi folks,
Im new to ssh tunneling What i want to do is open a reverse ssh tunnel to a server from behind a firewall. i have figured out how to do this from the xterm, but what i want to do is get it to start this tunnel anytime the system reboots. I have tried creating a script like this; #!/bin/sh /usr/bin/ssh -T -R 8888:localhost:80 root@www.myhost.com -g -e none & /usr/bin/ssh -T -R 8888:localhost:80 root@www.myhost.com -g -e none & These run fine if i start them in a terminal window but when i added them to /etc/rc.d/rc.local it doesnt work. #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local /home/start_ssh_tunnels but this doesnt work. Any ideas folks? Cheers in advance |
What are the permissions/ownerships on
the file? Cheers, Tink |
the permissions on the sript? they are 766? i think. they are set as executable
I't doesnt matter now any way i have just opened port forwarding on my router and i can start it by ssh'ing into the box and starting it manually. Cheers for your advice anyways D-A |
All times are GMT -5. The time now is 12:54 AM. |