How to remote access the web dashboard

Enable the web dashboard for your setup

See Dashboard Windows or Dashboard CLI for docker version

Install a ssh server on your PC with the storagenode

Install a ssh client on your device

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Get started with OpenSSH for Windows

Check connection

Here we will use a user as user on the remote ssh server, and server as hostname or IP of the remote ssh server.

ssh user@server
ssh user@server

Password:

user@server:~$

Port forwarding

ssh -L 14002:localhost:14002 user@server
ssh -L 14002:localhost:14002 user@server

Navigate to http://localhost:14002 in your browser, you should see a web dashboard of your storagenode.

The connection can be established to your ssh server at that stage from the LAN, however, to publish your ssh server to the internet we need to secure it first. We should enable a key-only way to log in to your server. To be able to do so we need to generate and export your ssh public key to your ssh server before disabling the password login.

Generate ssh keys

ssh-keygen
ssh-keygen

Export public key from the ssh client to the ssh server

If the ssh server is a Windows machine, then you can use this guide: Deploying the public key. Otherwise, use the Powershell:

cat ~/.ssh/id_rsa.pub | ssh user@server "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh user@server "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys"

Disable the password login on your ssh server with storagenode

We need to specify options PubkeyAuthentication yes and PasswordAuthentication no in the config file for the ssh daemon. So, return back to your server with storagenode.

You can use a ssh terminal to make these modifications, but be careful - if you have not added your key to the .ssh/authorized_keys file on your ssh server on previous steps, you will lose an access via ssh to your server.

Open the config file %programdata%\ssh\sshd_config with Notepad++ and set options PubkeyAuthentication yes and PasswordAuthentication no, save changes and restart the sshd service either from the Services applet or from the elevated Powershell:

Restart-Service sshd
Restart-Service sshd

Windows Configurations in sshd_config

Now check your connection: try to connect from your ssh client again, it should now use the ssh key for authentication instead of a password.

To add more security you can install applications such as fail2ban to your Linux or macOS server.

Now, you can make a port forwarding rule on your router for the 22 TCP port (default ssh port) to your ssh server. For more security we recommend to forward an unusual port to the 22 port of the PC with ssh.

Previous
How to add an additional drive?