-
Create upstart file
vim /etc/init/create_tunnel.conf
-
Start the script
sudo service create_tunnel start|stop|restart|status
Last active
March 9, 2017 07:42
-
-
Save sahilsk/334dec955bdbebc4a42b to your computer and use it in GitHub Desktop.
ssh tunneling upstart script. Tags: upstart, ssh, tunnel, init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: syntax=upstart | |
expect fork | |
umask 0000 | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
script | |
exec ssh -o StrictHostKeyChecking=no -nf -Ng -L 3307:host-connect-to-RDS-may-be.com:3306 [email protected] -i /home/ubuntu/.ssh/my-precious.pem | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment