Beginners Guide to SSH/Command Line Access

Launching a website online requires you to store it on a web hosting server. There are many options to choose from, like a Shared Hosting Server, VPS Server, Cloud Hosting Server, Dedicated Server, etc.

Of these, VPS Hosting in India is the most preferred hosting service due to the range of benefits offered by it. Once you buy a VPS Hosting plan, you will have to log in to the server for configuring it and getting started. 

Since you don’t own the server, you will be logging in to it remotely. SSH or Secure Shell is a remote administration protocol that offers a secure remote login to a server. Today, we will talk about SSH and offer a basic guide to understanding it.

What is SSH?

Secure Shell or SSH is a protocol that allows users to remotely access a server over the internet in a secured manner. It encrypts communication between the user and the server and ensures that the information is protected from online threats.

SSH & Encryption

SSH uses three types of encryption technologies:

  • Symmetrical encryption – Also called shared key or shared secret encryption, both the client and the server define the key using an agreed method.
  • Asymmetrical encryption – Also called a public-private key pair, this technology has two keys. The public key is distributed and shared with everyone. However, the private key is kept secured and linked to the public key.
  • Hashing – This is an irreversible form of cryptography that is used to verify if the client holds the correct input.

How does SSH work?

SSH is easy to use in Linux and Mac OS. For Windows users, an SSH client is required to open the secure connections. So, if you have opted for Linux VPS Hosting in India, then you don’t need a separate program to access the VPS via SSH. 

The following video shows how you can access your VPS over SSH:

Now, let us look at how SSH works:

  • Open the terminal program
  • Enter the command ssh {user}@{host}. This has three parts:
    1. The command SSH instructs the system to open an SSH connection.
    2. The term {host} refers to the server that you are trying to access. This can be the domain name or IP address of the server.
    3. Also, the term {user} refers to the user account that you want to use to access the server. 
  • After entering the right password, you are greeted with a remote terminal window.

SSH uses a server-client model to authenticate remote systems and encrypt the data being exchanged between them. The default SSH port is TCP Port 22. The client begins the connection by starting a TCP handshake and authenticating the connection.

Basic SSH Commands

Here are some basic SSH Commands that you need to know:

  • ls – List the names of the files
  • cd – Change directory
  • cat – Show contents of a file
  • mkdir – Create a new directory or folder
  • cp – Copy a file or folder
  • mv – Move a file or folder
  • touch – Create a new file

Summing Up

There are various aspects to understanding SSH and its role in securing the connection between remote terminals. We hope that this article offered a basic idea about SSH and how it works.