Teamviewer-like SSH daemon

As you mention having access to an outside server, you should be able to do this via reverse tunnel.

From your home system, you'll want to ssh to the remote server, with syntax like:

ssh -g -R 12345:localhost:22 user@remoteserver
  • the -g flag allows remote hosts to connect to the forwarded port. Otherwise, the default ssh setting is that only the system that first made the tunnel could use the port (meaning the home server)
  • -R is used to set up the reverse tunnel, and we're saying that connections to remoteserver:12345 should be forwarded to localhost:22

To use the tunnel, you'd do something like:

ssh -p 12345 remoteserver

Of course, for this tunnel to work, you'll need to ensure that the ssh session from homeserver to remoteserver stays alive.


@Ashley Steel, look at setting the value of ServerAliveInterval to a non-zero value. On the ssh commandline, that would be something like this: -oServerAliveInterval\ 60

You could also configure it in the .ssh/config file by remote host.