Linux: Installing SSH Client

Published

Prerequisites

1. The device must be running a Linux-based operating system.

2. A Linux terminal must be available on the system.

Checking for OpenSSH

Many Linux distributions already have the OpenSSH client enabled, so it's recommended to check if it's already installed before proceeding with a new installation.

To check the presence and version of the installed OpenSSH Client in your system, use the command:

		
ssh -V



Installation of the OpenSSH client is not necessary if the command output shows the version of OpenSSH and the release date, as shown in the following example:

		
ssh -V OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021



The OpenSSH client is missing in your system if executing the command results in an error, such as:

		
ssh -V bash: ssh: command not found



If the OpenSSH client is not installed in your system, you can install it using your distribution's package manager, as detailed in further instructions.

Installing OpenSSH

Before installing the OpenSSH client, it is recommended to update the package list of your system using a command, such as sudo apt update or sudo dnf update. This is an important but not mandatory step that helps ensure you receive the latest available versions of packages. An exception is Arch Linux, where both the update and installation are performed with a single command, sudo pacman -Syu, which includes the -Syu key for updating.

Select commands according to the version and type of your operating system to ensure the correct installation of the OpenSSH client.

Ubuntu / Debian / Mint

		
sudo apt update sudo apt install openssh-client


Fedora 22 and newer

		
sudo dnf update sudo dnf install openssh-clients


Fedora 21 and older

		
sudo yum update sudo yum install openssh-clients


Arch Linux

		
sudo pacman -Syu openssh

In Arch Linux, the openssh package includes both client and server components.


OpenSUSE

		
zypper up sudo zypper install openssh

Also in OpenSUSE, the openssh package includes both a client and a server.


CentOS/RHEL 8 and newer

		
sudo dnf update sudo dnf install openssh-clients


CentOS/RHEL 7 and older

		
sudo yum update sudo yum -y install openssh-clients


Once the OpenSSH Client has been successfully installed, you can proceed to create the key pair as described in the section "Creating Key Pair".