TeamViewer, open source replacement? (Connection created from remote device)

guiremote desktopremote-management

Is there an open source alternative to TeamViewer? The issue is having the remote placed device initiate a connection so that the help desk can manage the device.

I am looking to create a facility for remote management on devices we deploy which are BEHIND a firewall).

I understand that the SSH protocol supports X11 forwarding, but if I am going to deploy 10+ devices behind a firewall, how would I connect to the correct device to manage it?

Best Answer

Well, with a little bit of scripting you could put something together. Assuming you have a compatible version of OpenSSH (with support for Unix socket forwarding) and netcat (with support for Unix sockets), you can have all your clients phone in to your accessible server, and open up a reverse socket allowing access.

On the server side, create an account to use for the clients to connect to. For all clients to connect to your server with

ssh -R sockets/${SOME_CLIENT_ID}:localhost:22 -l ${SOME_USERNAME} ${SOME_SERVER}

When you need to connect to the client which came in:

ssh \
  -o StrictHostKeyChecking=no \
  -o ProxyCommand="nc -U ~${SOME_USERNAME}/sockets/${SOME_CLIENT_ID}" \
  -l root ${SOME_CLIENT_ID}"

systemd can easily help you maintain these connections alive if you set them up as a service.

Related Question