Site icon DesignLinux

SSH Command

SSH Command in Linux

SSH, Secure Shell is a protocol used for an encrypted connection between client machine and server. Using it client machine will make a secure connection to the SSH server on a remote system. By this connection user can run commands on remove server. In this tutorial we will show you how to use OpenSSH command-line client with ssh command to make connection with remote machine.

There are many free and commercial SSH clients are available for Linux, Windows, macOS and others. The OpenSSH is the most widely using ssh client. Let’s see how to install OpenSSH client.

Install OpenSSH Client

The OpenSSH client is also known as ssh. The OpenSSH client package also includes other SSH utilities such as scp and sftp.

Install OpenSSH Client on Linux

By default, OpenSSH client is pre-installed on most of Linux distributions. If your machine doesn’t have the ssh client installed then you can install it using package manager:

Install OpenSSH on Ubuntu and Debian

sudo apt update
sudo apt install openssh-client

Installing OpenSSH on CentOS and Fedora

sudo dnf install openssh-clients

Install OpenSSH Client on Windows 10

In Windows system, mostly PuTTy program is used to connect a remote server over the SSH. Windows 10 includes OpenSSH client and server. You can install it using PowerShell:

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~

It will show following output on success:

Path          :
Online        : True
RestartNeeded : False

Installing OpenSSH Client on macOS

By default, macOS ships with the OpenSSH client installed.

How to Use the ssh Command

You should check the following point before login to a remote machine using SSH:

Below is the syntax of the ssh command:


Type ssh in your terminal or PowerShell followed by the remote host name and port. If you have not change default SSH port then not need to mention the port it will take by default port 22:

ssh tecnstuff@

On first time login it will show message like below:

The authenticity of host '' can't be established.
ECDSA key fingerprint is SHA256:aydt22mbSuNuB5unE++yowF7lgA/38bLSiO3qmDS.
Are you sure you want to continue connecting (yes/no)?

Output will different for each user and the fingerprint stored in ~/.ssh/known_hosts file.

You should type yes to go ahead and store the remote fingerprint. After that it will ask to enter your password:

Warning: Permanently added '' (ECDSA) to the list of known hosts.
tecnstuff@'s password:

On successful authentication, you will be logged in to your remote machine.


You can make connection to your remote server via SSH using the ssh command.

If you have any questions, please leave a comment below.

Exit mobile version