Autostart SSH tunnels on load (Ubuntu)

Solution 1:

You can alias it in you ~/.bashrc.

Add that line alias db_connect="ssh -L 3333:dbserver:3306 [email protected]" And reload the bashrc file with source ~/.bashrc

And now you only have to type db_connect to ssh to your database server.