Remote access over SSH
How to control the Smart Safe Client computer from your laptop, over the customer's network, on Debian or Raspberry Pi OS Lite.
With SSH you open the terminal of the Smart Safe Client computer from your laptop, over the network. It is like sitting in front of that computer, but without connecting a keyboard or a screen to it.
A word you don't know?
This page uses Linux and networking words and commands. They are all explained in the Linux glossary
What it is for:
- The Raspberry Pi with Raspberry Pi OS Lite has no desktop: over SSH you can work on it comfortably.
- You copy the commands in this documentation on your laptop and paste them into the terminal: no need to type them by hand.
- In kiosk mode, the safe's screen shows only the Smart Safe Client. Over SSH you can check the computer without touching that screen.
What the network looks like

- Your laptop and the Smart Safe Client computer are connected to the same customer router (or switch), by cable or over Wi-Fi.
- The blue line is the SSH connection: it goes from your laptop to the Smart Safe Client computer without going out to the internet.
- The Cash Infinity is also on that network. The DE-70 connects to the Smart Safe Client computer by serial cable: it is not on the network.
The addresses in the drawing are an example. Each customer has different ones.
Are they on the same network?
Every device on the network has an IP address: four numbers separated by dots, for example 192.168.0.50. On most customer networks, two devices are on the same network when the first three numbers are the same:
| Your laptop | Smart Safe Client computer | Same network? |
|---|---|---|
192.168.0.60 | 192.168.0.50 | Yes: both start with 192.168.0 |
192.168.1.60 | 192.168.0.50 | No: 192.168.1 and 192.168.0 are different networks |
Guest network
If your laptop is on the guest Wi-Fi (for visitors), it usually cannot see the other computers. Connect to the customer's main network, or with a cable to the router.
What you need
- Your laptop with Windows 10 or 11, on the customer's network. Another computer with Linux also works.
- The user and the password of the Smart Safe Client computer, for example the
gloryuser. - The IP address of the Smart Safe Client computer (step 2).
- SSH enabled on the Smart Safe Client computer (step 1).
1. Enable SSH on the Smart Safe Client computer
You do this step once, on the Smart Safe Client computer.
If you checked SSH server when installing Debian, SSH is already enabled: go to step 2.
If not, on the Smart Safe Client computer open a terminal, copy this command, paste it and press Enter:
sudo apt install -y openssh-serverCheck that it is active:
systemctl status sshactive (running) must appear in green. Press q to go back to the terminal. See apt and systemctl
2. Find the IP address
On the Smart Safe Client computer, run this in the terminal:
hostname -IThe address appears, for example 192.168.0.50. Write it down. If several appear, use the one that starts the same way as your laptop's. See hostname
To see the address of your Windows laptop, run ipconfig in your terminal and look for IPv4 Address. See ipconfig
The address can change
With the automatic network (DHCP), the router can give the computer a different address after a restart. If it does not connect another day, check the address again. To keep it from changing, you can fix it in the Smart Safe Client (Settings › Network › Connections, Fixed address) or reserve it on the customer's router.
3. Test the network from your laptop
On your Windows laptop, right-click the Start button and open Terminal (on Windows 10, Windows PowerShell). Type ping and the address from step 2:
ping 192.168.0.50| What appears | What it means |
|---|---|
| Reply from 192.168.0.50 | The network is fine. Go on to step 4. |
| Request timed out or Destination host unreachable | Your laptop cannot reach that computer. See If something goes wrong |
On Windows, ping tries 4 times and stops on its own. On Linux it keeps going until you press Ctrl+C. See ping
4. Connect over SSH
In your laptop's terminal, type ssh, the user, @ and the address:
ssh glory@192.168.0.50Replace glory with the user and 192.168.0.50 with the address from step 2. See ssh
The first time, a question like this appears:
The authenticity of host '192.168.0.50 (192.168.0.50)' can't be established.
ED25519 key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no/[fingerprint])?Type yes and press Enter. This is normal: your laptop saves that computer's “fingerprint” to recognize it next time.
Type the user's password and press Enter. Nothing appears while you type it: this is normal.
Done: the terminal line changes to something like glory@smartsafe:~$. From now on, everything you type runs on the Smart Safe Client computer.
5. Work and exit
- Use the commands in this documentation as if you were in front of that computer. In the Windows terminal, paste with Ctrl+V or with the right mouse button.
- To exit, type
exitand press Enter. - If the connection drops, for example when you restart that computer with
sudo reboot, this is normal: wait a minute and connect again with the samesshcommand.
Copy a file (scp)
scp copies files over the same connection. You use it in the terminal of your laptop, not inside the SSH connection. See scp
From your laptop to the Smart Safe Client computer:
scp archivo.txt glory@192.168.0.50:/home/glory/This copies archivo.txt, which must be in the folder where the terminal is open, to the home folder of the glory user.
From the Smart Safe Client computer to your laptop:
scp glory@192.168.0.50:/home/glory/archivo.txt .The dot at the end means “here”: the folder where the terminal is open.
Computers copied from the same image
If the cloned image had SSH enabled, all the copies have the same SSH identity. To give each copy its own, connect to each one and run these three commands, one at a time, exactly as they are:
sudo rm /etc/ssh/ssh_host_*
sudo ssh-keygen -A
sudo systemctl restart sshThe first one deletes the copied identity, the second creates a new one and the third restarts the SSH service. The open connection keeps working. Then, on your laptop, run ssh-keygen -R with that copy's address (the last row of If something goes wrong has the details). See rm and ssh-keygen
Security
-
SSH is used only inside the customer's network. Do not open the router's port 22 to the internet.
-
The password of the computer's user gives access to everything: share it only with the technical team.
-
When you finish, exit with
exit. -
If the customer does not want SSH enabled, turn it off when you finish:
sudo systemctl disable --now sshTo turn it on again:
sudo systemctl enable --now ssh.
If something goes wrong
| What appears | What is happening | What to do |
|---|---|---|
Connection timed out, No route to host, or ping gets no reply | Your laptop cannot reach that computer. | Check that they are on the same network (the first three numbers of the IP address), that the address is correct and that the computer is on. |
Connection refused | The computer answers, but SSH is not enabled. | Enable SSH (step 1). |
Permission denied, please try again. | The user or the password is wrong. | Check the user (what goes before the @) and the password. Capital letters matter. |
| “ssh” is not recognized as a command (Windows) | Your Windows is missing the SSH client. | In Settings, search for Optional features and add OpenSSH Client. |
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! | The computer at that address changed: it was reinstalled, or it is another copy of the same image. | On your laptop, run ssh-keygen -R 192.168.0.50 (with that computer's address) and connect again. |