ssh tunnel - remote access through nat

Drew cotharyus at gmail.com
Tue Jul 25 17:04:02 UTC 2006


Hi,
I've got a box that's nat'd out to the internet. It is occassionally
neccessary for me to access this box remotely. The obvious answer is:

ssh -R 7777:localhost:22 remote.box cat

run from the nat'd box where remote box is a place I pretty much always have
access too from anywhere, anytime. The problem is that the connection
between these two boxes is famously unreliable - so I need to ensure that
this connection stays available. Unfortunately, the procedure for this is
not obvious to me. I've thought about a cron job, as the connection would
simply fail if it couldn't bind to 7777 on the remote box to listen. But I'm
thinking there has to be something that makes more sense. Suggestions?
Feedback? Thanks in advance for any pointers.


More information about the freebsd-questions mailing list