Page 1 of 1

Reverse SSH Tunnel Question

Posted: Wed Dec 10, 2014 6:25 pm
by aristosv
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?

Thanks

Re: Reverse SSH Tunnel Question

Posted: Wed Dec 10, 2014 6:33 pm
by ghans
Use keys instead of passwords :
http://www.howtogeek.com/66776/how-to-r ... -password/

ghans

Re: Reverse SSH Tunnel Question

Posted: Wed Dec 10, 2014 6:41 pm
by henry3141
Have you been able to get the reverse connection (server to Rpi) started?
If so can you show me the verbose output of the following command entered at remotehosthere:

ssh -p 5001 pi@localhost -v

Despite many attempts I could not get the reverse connection working.

Henry