What is SSH and How does it work?

What is SSH and How does it work?

4 mins read310 Views Comment
Updated on Feb 9, 2024 17:08 IST

A protected network protocol called SSH is used to connect to distant computers on a network. Networks enable computer communication. As a result, network researchers established a set of guidelines for interacting with other computers and began creating protocols like Telnet, which allow one person to take control of another computer.


However, they lack security, allowing anyone in the network’s middle to view and intercept the data being sent. A more secure protocol called SSH was established in the middle of the 1990s and quickly replaced the unreliable telnet protocol.

Before we dive deeper into the article, let’s go through the list of topics that we will cover in this article:

Table of Contents (TOC)

What is SSH?

A network protocol called SSH, also known as Secure Shell or Secure Socket Shell, aids in securing access to and communication with distant devices (mostly remote servers).

Network administrators and developers frequently use it to administer remote systems and applications, run commands, share files, etc. It offers strong encryption.

You can also explore: Difference Between SSL and TLS

Need of SSH

SSH was developed in 1995 to address security problems with un-secure remote access protocols including Telnet, rlogin, and rsh.

Let’s now discuss Telnet, also known as Teletype Network, which was created in 1969. It is a straightforward command-line tool that you can use to connect to a distant server (anywhere located in the globe). Send orders to be carried out on that server, acting as though you were in front of it (even miles away from the server). Telnet uses a network to send and receive plain text messages.

The commands you might issue could be to start/stop services, run applications, create folders, create/delete/transfer files, etc. The issue with adding a second computer to a network is that the data being transmitted will go through many networks.

Early on, when security was less of a concern, all communication is done in plain text. Consequently, it is simple to intercept data being transmitted between a client and a server through the internet. And because the messages are not encrypted, it can be read.

As a result, plaintext protocols are extremely unsafe and should never be used for transmitting passwords or other sensitive data. SSH is therefore viewed as a secure substitute for established remote access network protocols.

You can also explore: What Is a Network Component?

How does it Work?

SSH uses a client-server architecture for secured communication over the network by connecting an SSH client with the SSH server. SSH server typically listens on TCP port 22 by default (you can change this for better security).

You can also explore: Difference Between Hub And Switch

In order to establish trust between the client and server, public-key cryptography is used. To further protect privacy and data integrity, the protocol also employs robust symmetric encryption & hashing techniques for message exchanges between the client and server.

The figure shows an image related to SSH.

 For remote servers, Linux is the most popular operating system due to its reliability and security. Numerous servers running the Linux operating system have been operating for years without any errors or even restarts.

Most SSH sessions (the time we use to connect to the remote server) simply involve the following two actions:

  • Authentication
  • Command Execution

Clients can be authenticated by SSH servers in a number of ways.

And the two common methods are:

  • Password-based
  • Key-based

For clients with OpenSSH installed, password-based authentication is the default form of authentication. Although it is the simplest, it is not the most secure kind of SSH authentication. Modern brute force attacks may defeat the authentication even though passwords are provided to the server safely. SSH key pairs are generated as a dependable and safe alternative via key-based authentication, which further enhances system security. A secure connection is created between the client and server after the server successfully authenticates the latter.

Must explore: How does HTTP work?

Accessing Remote Server Using SSH

If you use Mac/Linux, OpenSSH is already installed by default, so you may type and execute SSH commands right from the terminal. To run SSH commands on Windows, you must install one third-party terminal emulator client. The most widely used SSH client for Windows is PuTTY.

You need to be aware of at least two things in order to connect to a remote server via Secure Shell .

  • Server host
  • User name

Syntax for basic SSH command:

$ ssh <user-name> @ <host> -p <port-no>

The host is either an IP address or a domain name, and the user name is the username of the remote system to which we are attempting to connect (rather than the user on your local machine).


The fact that every communication between the server and client is encrypted is the main factor in SSH’s popularity. Most people believe that using Secure Shell is difficult and that understanding how it operates is difficult, but it is actually easier than you may imagine. Now that you know the basics of Secure Shell , you can see how it functions, how secure it is, and why it’s so important for communication.

Author: Megha Chadha

About the Author

This is a collection of insightful articles from domain experts in the fields of Cloud Computing, DevOps, AWS, Data Science, Machine Learning, AI, and Natural Language Processing. The range of topics caters to upski... Read Full Bio