TMCnet Feature Free eNews Subscription
August 16, 2021

SSH: What Is It and How Can You Use It?



We all know that when you get a hosting account, the service provider sets it up on a physical machine situated in a data center. We all know that the data center may be on the other side of the world, and we also know that you can control your account from the comfort of your own home despite the geographical distance.



People take all this for granted, and they rarely think about the technology that enables them to remotely manage their hosting service. As a result, they're not fully aware of how this technology works, and they don't use it to its full potential.

SSH is a prime example of this, and today, we'll take a closer look at it and help you understand how useful it can be for your project.

What is SSH?

SSH stands for Secure Shell, and it's a networking protocol working in a client-server architecture. In our case, the client is your home computer, and the server is your hosting account.

It's far from the only protocol of this kind. In fact, people started establishing connections between remote computers long before SSH appeared in 1995.

However, other alternatives exchange messages between clients and servers in plain text. This could include login details, personal information, and other sensitive data.

The communication is transmitted over thousands of miles, and if it's in a human-readable format, it can be easily intercepted, stolen, and abused.

This is what Tatu Ylönen, the inventor of SSH, was fighting against when the idea struck him all those years ago. He was trying to fend off a password sniffing attack aimed at Helsinki University, and he realized that using encryption, he can create a truly secure communication channel between a client and a server.

What is Encryption?

In very basic terms, encryption turns a human-readable piece of information into what looks like a jumbled-up mess of letters and digits. More often than not, the encrypted data can be turned back to its original state with the help of a cryptographic key. Modern implementations of SSH use three types of encryption:

  • Symmetric encryption
    In symmetric encryption, the information is encrypted and decrypted using the same cryptographic key.
  • Asymmetric encryption
    Asymmetric encryption makes use of public-private key pairs. The data is encrypted with a public key, but it can only be decrypted with the correct private one.
  • Hashing
    Hashing is a one-way encryption function. Like regular encryption, you can use it to protect a piece of information, but you don't do it using a cryptographic key. Instead, you use an algorithm to create a hash from the original data. If the algorithm is correctly implemented, retrieving the original information from the hash is not possible.

How Does SSH Work?

Establishing an SSH connection is a pretty complicated process.

First, the client and the server negotiate the encryption and hashing algorithms they'll use and generate public-private key pairs. The server uses the public key to encrypt a challenge that can only be decrypted with the client's private key.

The SSH session begins after the client successfully decrypts the challenge.

During the next step, the client and the server use a predetermined key exchange algorithm to create a symmetric key that will be used to encrypt and decrypt the communication.

At this stage, the client and the server also use hashing to create Hash-based Message Authentication Codes (HMACs). An HMAC is attached to every single message exchanged during the session, and its goal is to guarantee the message's authenticity and origin.

Finally, we come to the authentication phase, during which the user proves their identity and starts sending information.

What Can I Use SSH For?

SSH is mainly used to access Unix-based operating systems, though recent versions of Microsoft (News - Alert) Windows also support it. If you use Linux or macOS, you can establish an SSH connection directly through the terminal. Windows 10's PowerShell also supports the protocol out of the box, and there are many client applications that can help you access the server via SSH.

Although they offer a variety of different features, you can't expect a Graphic User Interface (GUI) from any of them. In its default implementation, SSH only works via a Command-Line Interface.

Establishing an SSH connection is pretty much the same as opening a terminal window on the server from miles away. What you can do with it depends on the level of access your user has.

Self-managed VPS and dedicated server hosting plans usually give you root access, meaning you're free to install software, configure your firewall and other system services, and do pretty much anything else a system's owner might want. Your privileges will be more limited on a shared or managed account, but you still have access to your files, databases, and a wide range of tools that can help you manage your website.

Command execution is at the heart of SSH's default implementation. However, the protocol can also be used to protect other network services.

SFTP, for example, is the secure version of the File Transfer Protocol that runs through an SSH connection. It's supported by popular FTP clients like FileZilla, so it's possible to take advantage of SSH's extra security even if you don't feel especially comfortable using the command-line interface.

Is It Possible to Manage My Website Without SSH?

The fact that you can use SSH only via the command-line interface can scare some people away.

We live in an age when hosting providers are in a race to make their services as novice-friendly as possible. As a result, more and more people with little or no experience pluck up the courage to get a hosting account and start a new project.

Asking them to learn to use the terminal is unlikely to go down well with many of them. Providers know that, and they've been looking for ways of implementing some of SSH's functionality into their more user-friendly tools.

That's why you now have web hosting control panels that let you manage your hosting account's files and databases, create email accounts, and configure settings vital for their project's performance. They're all browser-based, relatively easy to use, and if you do get stuck, there's a lot of information online that can point you in the right direction.

In other words, if you don't feel comfortable working with the command-line interface, your provider most likely has the GUI-based tools that can help you manage your hosting account without using SSH.

However, if you're experienced and know how to use the protocol to its full advantage, the speed and efficiency it offers are unmatched.

Conclusion

The truth is, it's difficult to realize just how powerful SSH can be before you master it completely and learn how to use it to its full potential.

There's no sugarcoating it, though – acquiring enough knowledge to make the most out of the secure shell protocol takes a lot of time and effort and may be hard for people with limited experience. Fortunately, there are enough alternatives that protect your data just as well but are much easier to use.



» More TMCnet Feature Articles
Get stories like this delivered straight to your inbox. [Free eNews Subscription]
SHARE THIS ARTICLE

LATEST TMCNET ARTICLES

» More TMCnet Feature Articles