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

**URL:** https://forum.syncthing.net/t/connect-to-remote-server-webui-with-ssh-d8080-and-a-dedicated-browser/21308
**Category:** Support
**Created:** [December 20, 2023, 2:58am UTC](https://forum.syncthing.net/t/connect-to-remote-server-webui-with-ssh-d8080-and-a-dedicated-browser/21308 "2023-12-20T02:58:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![4tersgc](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/4/87869e/32.png) [@4tersgc](https://forum.syncthing.net/u/4tersgc)
#### Post date: [December 20, 2023, 2:58am UTC](https://forum.syncthing.net/t/connect-to-remote-server-webui-with-ssh-d8080-and-a-dedicated-browser/21308/1 "2023-12-20T02:58:59Z")

</div>

How are you connecting to your remote servers running syncthing?

I used to use

`ssh -D8080 host`

…and then set a dedicated browser to use the dynamic socks proxy that ssh has set up from that. (proxy: 127.0.0.1:8080)

I used to use Firefox and foxyproxy for this, but then there were some changes to security and I ended up using Chromium. But then Chromium changed as well so that it wants to use the system wide proxy settings, so I started using SwitchyOmega for Chromium. But now that isn’t working. I tried ‘links’, the cli console curses browser, but it doesn’t seem to have java script.

What do you use?

---

<div class="post-metadata">

### Author: ![gadget](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@gadget](https://forum.syncthing.net/u/gadget)
#### Post date: [December 20, 2023, 4:59am UTC](https://forum.syncthing.net/t/connect-to-remote-server-webui-with-ssh-d8080-and-a-dedicated-browser/21308/2 "2023-12-20T04:59:14Z")

</div>

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:

```plaintext
ssh -L local_port:host:host_port user@remote_host

```

For example…

```plaintext
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`:

```plaintext
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:

```plaintext
ssh syncthing-webui

```

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [January 20, 2024, 10:11am UTC](https://forum.syncthing.net/t/connect-to-remote-server-webui-with-ssh-d8080-and-a-dedicated-browser/21308/4 "2024-01-20T10:11:22Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
