What is SSH and How Does It Work?

What is SSH and How Does It Work?

Technological advancements have enabled users to control devices from great distances, even when they are separated by continents. One such capability is made possible thanks to SSH, also known as secure shell connection.

SSH allows you to remotely access servers or other devices connected to the internet. But what exactly is SSH and how does it work?

This article will provide a comprehensive explanation of what SSH is and how it ensures secure connections during the connection process.

What is SSH?

SSH is an administrative protocol that enables users to access and modify various settings and files within a server.

You may be familiar with Telnet. SSH, however, is an improvement over Telnet, which was previously considered insecure due to the lack of encryption.

Unlike Telnet, SSH ensures an encrypted connection using various cryptographic technologies such as symmetric encryption, asymmetric encryption, and hashing.

These three techniques guarantee encrypted connections, which is why it is called SSH, derived from "Secure Shell Connection."

When using SSH, you have the option to authenticate remote users before establishing a connection. Additionally, SSH allows you to send input from the SSH client to the host (server) and then receive the results back to the client user.

SSH is not limited to OSX; you can also use it on other operating systems like Windows and Linux. For Windows users, a popular SSH application called Putty is available.

In summary, SSH makes it convenient to manage servers without physically being present at the server location. It is not limited to servers alone; you can utilize SSH to configure and manage computers and desktop devices within the same network without direct physical access.

Having understood what SSH is, it's also beneficial to explore the advantages of SSH.

Benefits of SSH

SSH brings several advantages to the table. What are the benefits of SSH? Let's explore them below.

1. Full Hosting Control

Using SSH, remote hosting control is no longer an impossible task. It's like having a remote control to pilot your aircraft according to your desires.

With SSH, you have full rights to control your hosting. Without the need to physically access the server, you can monitor server logs, install or uninstall applications, transfer data, and much more.

2. Avoiding Cyber Crime

SSH provides specific key cryptography techniques. Automatically, SSH will terminate connections when hackers attempt to hijack your connection.

As a result, you are protected from various cybercrime attacks such as IP and DNS spoofing, data manipulation, illegal tracking, and others.

3. Strong Security with Authentication Systems

Data theft by hackers becomes much more challenging when you use SSH. SSH enables data encryption, making it difficult for hackers to easily crack passwords and user information.

Also, Read The Complete Beginner's Guide to Using SSH.

How SSH Works

The SSH protocol operates using a client-server model. The connection that takes place is initiated by the SSH client to the SSH server.

The SSH client initiates the connection process and uses cryptographic keys to verify and identify the SSH server. As long as the keys used by the SSH client do not match those of the SSH server, the connection will never be established.

Both the SSH client and SSH server can establish a connection using the same key and through a verification process. Subsequently, the established connection is encrypted using symmetric encryption and hashing algorithms. The encryption process aims to ensure the confidentiality and integrity of the data exchanged between the client and server.

To begin the connection, the SSH client calls the SSH server using an SSH client application (such as PuTTY on Windows). Then, the SSH server sends the public key to the SSH client. The SSH client responds by providing the key pair given by the SSH server.

Next, both parties negotiate or verify the connection and start establishing a secure connection. Once completed, the SSH client can enter the server, and the data exchange continues to be encrypted throughout the session.

What is an SSH client?

An SSH client is an application used to connect an operating system to an SSH server. This application is sometimes pre-installed on operating systems like Linux and macOS. However, if you are using Windows, you can use applications like PuTTY. You can follow the article "how to use PuTTY" for a complete guide.

Users of macOS and Linux do not need to install additional applications because the SSH client feature is already available in their respective Terminals. You just need to use the command $ ssh username@server_address to establish a connection.

When executing the SSH command by pressing 'Enter', you will be prompted to enter the password of the user being used. If you enter the correct password corresponding to the username, the connection will be established, and through that Terminal, you can control the SSH server.

3 SSH Encryption Technologies

In the "What is SSH" section earlier, we briefly discussed the SSH encryption technologies. There are at least three technologies offered, namely symmetric encryption, asymmetric encryption, and hashing. All three serve to ensure a more secure data exchange process between the client and server.

1. Symmetric Encryption

Symmetric encryption is also known as shared key encryption. As the name suggests, symmetric encryption is a type of encryption that uses a key to perform both the encryption and decryption of data exchanged between the client and server.

Symmetric encryption employs a pair of keys. Typically, one key resides on the server side, and the other key is on the user side, so the server can recognize trusted users. Thus, each user with the key can view the exchanged data.

Symmetric encryption continuously performs its task during the SSH client's connection with the server according to the agreed-upon method. The agreement on this communication method aims to prevent third parties from reading the exchanged data.

The Key Exchange Algorithm plays a role in the symmetric encryption process during data exchange. Additionally, during the data exchange process, keys on both the client and server sides are not exchanged, enhancing the security of this algorithm.

A unique feature of the Key Exchange Algorithm is that the encryption and decryption processes occur independently on each device (client and server). This prevents any third party attempting to steal or intercept the exchanged data from being able to read it.

2. Asymmetric Encryption

Asymmetric encryption is quite different from symmetric encryption. While symmetric encryption uses one key for both the client and server, asymmetric encryption utilizes two keys: the private key and the public key. Typically, the private key is owned by the server, while the public key is possessed by users or clients.

As the name suggests, the public key is openly available for use by all clients. However, during the data exchange process, encryption can only be performed using a pair of public and private keys, not with different keys. Thus, a one-way relationship exists, ensuring that a host (server or client) with the public key will never be able to open its own encrypted messages.

3. Hashing

SSH also employs one of the hashing encryption techniques. Hashing is a type of cryptography that cannot be decrypted, earning it the name "one-way hash."

One-way hashing serves to create long and unique encryption values with no clear patterns for exploitation. The purpose of one-way hashing is to secure all data being exchanged during the SSH connection process. Through hashing encryption, all data undergoes one-way encryption and cannot be reversed (decrypted).

One-way hashing cannot be used in all types of data exchange. SSH employs one-way hashing only to verify the authenticity of messages and similar purposes. A verification system like HMAC (Hash-based Message Authentication) can be used for this purpose. The HMAC system ensures that data is highly resistant to manipulation in any way.


SSH is one of the crucial topics that you should learn, especially if you frequently deal with client-server connections. Despite Telnet being available before, it couldn't guarantee the security of the generated connection.

On the other hand, SSH can secure the ongoing data exchange using various encryption technologies it possesses.

Hopefully, this brief explanation of what SSH is and how it works can be beneficial for you. Please feel free to leave comments below if you have any further questions.

Post a Comment

Post a Comment