Skip to content

Unreachable server because of SSH

Issue

The server has a correctly assigned IP address (you can ping it), but you are unable to establish an SSH connection.


Putty SSH error
Error message example

Cause

The SSH service is most likely not running, or it is not installed.

Solution

To verify the functionality of the SSH service, follow these steps:

Verify the SSH service is installed

  1. Run the following command:

    shell
    sudo systemctl status sshd.service
  2. If the terminal output displays the service is installed (example output below), skip to the next section of SSH troubleshooting.

  3. If the output says the service could not be found, enter the following command:

    shell
    sudo apt update

    then the following command:

    shell
    sudo apt install openssh-server

Continue to the following section of the manual.

Check the SSH service is running properly

  1. Start the terminal.

  2. Run the following command:

    shell
    sudo systemctl status sshd.service
  3. Check the Active row in the terminal output. If the service is inactive, run the following command:

    shell
    sudo systemctl start sshd.service

    then repeat the first command to check the status again:

    shell
    sudo systemctl status sshd.service
  4. Check the Loaded row in the terminal output. If the service is disabled, run the following command:

    shell
    sudo systemctl enable sshd.service

    This ensures the service will be automatically started after every boot.