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:
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:
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:
It must match theSHA256:... 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:
Command line basics¶
A few conventions used throughout the guide:
- Commands run as
nodeadminunless the text says otherwise. Code blocks have no$prompt, so you can copy them as they are. sudoruns a command as root and asks for Password [A].sudo su - moneroswitches to themoneroservice user. Typeexitto come back.- Edit files with
nano: ++ctrl+o++ saves, ++ctrl+x++ quits. journalctl -fu SERVICEfollows 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):
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:
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:
ssh: connect to host … Connection timed out / No route to host
- Check that
NODE_IPis still correct (hostname -Ion 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:
If you did not reinstall, stop: something else may be answering on that address.