How to Check if SSH Client is Installed on Ubuntu
This article explains how to quickly verify if the Secure Shell (SSH) client is already installed on your Ubuntu Linux system. You will learn the simplest terminal commands to check for the SSH client’s presence and how to interpret the command outputs.
Method 1: Check the SSH Version
The quickest way to check if the SSH client is installed is by querying its version. Open your terminal (Ctrl+Alt+T) and run the following command:
ssh -V- If installed: The terminal will output the OpenSSH
version details, for example:
OpenSSH_8.9p1 Ubuntu-3ubuntu0.6, OpenSSL 3.0.2 15 Mar 2022. - If not installed: You will receive an error message
stating
Command 'ssh' not found.
Method 2: Use the
which Command
You can locate the binary executable of the SSH client using the
which command. Run:
which ssh- If installed: It will return the file path of the
client, typically
/usr/bin/ssh. - If not installed: The command will return no output.
Method 3: Check via the Package Manager
Ubuntu uses the Debian package manager (dpkg) to manage
software. You can search your system’s installed packages specifically
for the OpenSSH client by running:
dpkg -l | grep openssh-client- If installed: You will see a line starting with
iifollowed byopenssh-clientand its version details. Theiiindicates that the package is successfully installed.
What to do if the SSH Client is missing?
If the tests above show that the SSH client is not installed, you can easily install it from the official Ubuntu repositories using the following commands:
sudo apt update
sudo apt install openssh-client