Follow up to SSH access to office host behind NAT router

1

I have a problem similar to the already posted SSH access to office host behind NAT router to access from a homepc an OfficePc using a server with no root access the given solution was:

youatwork@officepc$ autossh -R 12345:localhost:22 notroot@serverpc

Later:

you@homepc$ autossh -L 23456:localhost:12345 notroot@serverpc

you@homepc$ ssh youatwork@localhost -p 23456

Provided by @piskvor That works nicely, but I have one problem if the officepc resets because a power cut I can't connect any more to officepc I don't know if the solution provided by @Velmont will work, thanks!

Leosar

Posted 2014-04-12T16:55:01.883

Reputation: 123

You need something to restart the autossh from your office PC. That answer by Velmont should work - but you need to put it somewhere it gets autostarted (be it crontab, rc.local, .profile or .autostart) – Piskvor left the building – 2014-05-30T14:55:03.973

1

Thanks! I used upstart as described here http://serverfault.com/questions/224432/using-upstart-to-manage-autossh-reverse-tunnel

– Leosar – 2014-05-31T22:37:04.163

No answers