I have a raspberry pi behind a firewall. I found that if I use Reverse SSH Tunnel I am able to access it without opening ports on the Firewall. So I tried it like shown below and it works.
/usr/bin/ssh -R 5001:localhost:22 root@remotehosthere
My problem is that when the raspberry pi is restarted, the command has to be entered again, in order for me to be able to access it again.
I could put the command in cron @reboot, but it prompts for a password.
Is there a way I can automate this thing?