Manage syncthing remotely via ssh

I have two webservers that have no GUI and are managed remotely via ssh.

In order to synchronize data across the two servers in “real time”, I opted for syncthing. However, syncthing configuration is done on a web browser GUI which isn’t installed in my servers.

The way I found to have access to the GUI of each server was to create an ssh tunnel and tunnel my local web browser traffic into the remote servers:

ssh -L 12341:localhost:8384 webserver1
ssh -L 12342:localhost:8384 webserver2

This commands will allow you to tunnel traffic from localhost port 12341 into webserver1 port 8384 (and vice-versa) and from localhost port 12342 into webserver2 port 8384 (and vice-versa). In other words, when you point your browser to localhost:12341 in your local computer, it will connect to webserver1:8384 and localhost:12342 will connect o webserver2:8384.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s