Remote SSH access¶
You can enable SSH to access a terminal on your system over your network. Once enabled, you can connect from any system with an SSH client.
These instructions also install avahi-daemon, so you can connect using the server’s name with no other infrastructure needed.
Enable SSH server¶
Open a terminal emulator.
On systems with a desktop environment, launch a terminal emulator.
On systems with no desktop environment, a terminal emulator starts by default once you log in.
Install packages:
sudo apt install -y openssh-server avahi-daemon
Commands using
sudo
may prompt for your password. If so, type your password and press Enter. For security, nothing is shown on the screen when typing.
Find your username:
id -un
Find the system’s hostname:
hostnamectl hostname
Connect remotely¶
Open a terminal.
Install an SSH client:
On PureOS or Debian systems:
sudo apt install -y openssh-client
On other systems, refer to your system’s documentation.
Connect to the server:
ssh <username>@<hostname>.local
Fill in the username and hostname you found above. For example:
ssh bill@office-laptop.local
If this is your first time connecting from this system, SSH will ask to confirm the server’s identity. On a trusted network, you can type
yes
and press Enter. SSH will save this identity and use it to authenticate the server in the future.The authenticity of host 'office-laptop (192.168.1.101)' can't be established. ED25519 key fingerprint is SHA256:ki457+eGuZOHy/myYC9YtLGUP8hY+EqIn8wmy+Vo5rs. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type the password for the remote user and press Enter.