Connect to remote server WEBUI with ssh -D8080 and a dedicated browser?

Correct, links doesn’t support JavaScript, but even if it did, there’s also no CSS (Cascading Style Sheets) support.

Although ssh -D is an option, it’s a bit overkill because connections aren’t limited to just a single port – it’s allowing apps on the client to connect to any port and/or network interface on the remote host.

A simpler and more secure option is to forward just the required port. Then you won’t need to change proxy settings and/or rely on web browser add-ons.

For OpenSSH, the command syntax is as follows:

ssh -L local_port:host:host_port user@remote_host

For example…

ssh -L 1234:127.0.0.1:8384 logmein@10.10.10.10
  • ssh – OpenSSH client.
  • -L – Forward a local network port.
  • 1234 – A locally available network port to listen on.
  • 127.0.0.1 – Host to forward connections to.
  • 8384 – Network port on the specified host being forwarded to.
  • logmein@10.10.10.10 – Remote host to tunnel to, logging on as logmein.

Now choose any suitable web browser – no proxy changes and/or proxy add-ons required – and go to http://127.0.0.1:1234/.

Connections to local port 1234 are tunneled thru remote host 10.10.10.10 and forwarded to 127.0.0.1:8384 where Syncthing’s built-in web server is waiting for connections.

For convenience, add the following OpenSSH configuration block to ~/.ssh/config:

Host syncthing-webui
	LocalForward 127.0.0.1:1234 127.0.0.1:8384
	HostName 10.10.10.10
	User logmein

Then to open the SSH tunnel, refer to the host alias:

ssh syncthing-webui
6 Likes