Skip to content
atori.tech

1.3 Remote access

From now on you run commands from your regular computer, over SSH.

Find your node

On the node's console, run:

hostname -I

Note the first address, for example 192.168.1.50. This guide calls it NODE_IP.

Tip

In your router's settings, give the node a DHCP reservation, so it keeps this address after reboots. Every firewall rule and wallet setting in this guide relies on NODE_IP staying the same.

Log in over SSH

From your regular computer:

ssh nodeadmin@NODE_IP

The first time, SSH shows the server's key fingerprint and asks whether to trust it:

The authenticity of host '192.168.1.50 (192.168.1.50)' can't be established.
ED25519 key fingerprint is SHA256:Xx1yZ2...
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Check the fingerprint before typing yes (recommended)

On the node's console, print its key fingerprint:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
It must match the SHA256:... value your regular computer shows. If it matches, you know you're talking to your node and not to something pretending to be it.

Type yes, then enter Password [A].

Use the hostname

Most home networks also resolve monerobox.local (via mDNS) or monerobox (via the router's DNS), so ssh nodeadmin@monerobox.local often works too.

Validation

You're in when the prompt changes to:

nodeadmin@monerobox:~$

Command line basics

A few conventions used throughout the guide:

  • Commands run as nodeadmin unless the text says otherwise. Code blocks have no $ prompt, so you can copy them as they are.
  • sudo runs a command as root and asks for Password [A].
  • sudo su - monero switches to the monero service user. Type exit to come back.
  • Edit files with nano: ++ctrl+o++ saves, ++ctrl+x++ quits.
  • journalctl -fu SERVICE follows a service's log; ++ctrl+c++ stops following.

Better security

Password logins are fine to get started. Later, switch to SSH keys and turn password logins off.

Extras (optional)

A shortcut: ssh monerobox

On your regular computer, add this to ~/.ssh/config (create the file if needed):

Host monerobox
    HostName NODE_IP
    User nodeadmin
From then on, ssh monerobox is enough.

Keep long tasks running when you disconnect (tmux)

Builds and long downloads stop if your SSH connection drops. Run them inside tmux, which keeps going on the node:

sudo apt install -y tmux
tmux new -s work
Detach with ++ctrl+b++ then ++d++. Reconnect later and pick up where you left off with tmux attach -t work.

Troubleshooting

ssh: connect to host … port 22: Connection refused

The SSH server isn't installed or isn't running. At the node's console:

sudo apt install -y openssh-server
sudo systemctl enable --now ssh

ssh: connect to host … Connection timed out / No route to host
  • Check that NODE_IP is still correct (hostname -I on the node).
  • Make sure your regular computer is on the same network, and not on a guest Wi-Fi that's isolated from the rest of your home network.
  • If it worked before, check that the SSH rule from 1.5 is still there: sudo ufw status | grep 22.
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

You reinstalled the node, so it has a new key, but your regular computer remembers the old one. If you did reinstall, remove the old entry and connect again:

ssh-keygen -R NODE_IP
If you did not reinstall, stop: something else may be answering on that address.