auto start a reverse ssh tunnel on system startup
Solution 1:
Just add sleep 60;
before your ssh command:
@reboot sleep 60;ssh -N -f -R 0.0.0.0:1234:localhost:22 -i /home/username/.ssh/id_rsa [email protected]
after reboot your network is still down
Solution 2:
A better solution may be autossh:
"autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic."
As the quote says, this has the added benefit of providing 'always on' capabilities.