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

  1. 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.

  2. 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.

  3. Find your username: id -un

  4. Find the system’s hostname: hostnamectl hostname

Connect remotely

  1. Open a terminal.

  2. Install an SSH client:

    • On PureOS or Debian systems: sudo apt install -y openssh-client

    • On other systems, refer to your system’s documentation.

  3. Connect to the server: ssh <username>@<hostname>.local

    • Fill in the username and hostname you found above. For example: ssh bill@office-laptop.local

  4. 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])?
    
  5. Type the password for the remote user and press Enter.