What is SSH

SSH(Secure Shell), is a UNIX-based command interface and protocol for securely getting access to a remote computer. SSH uses public key cryptography for both connection and authentication. SSH is the default tool for system administrator to perform various tasks on servers remotely.

When do we need to use SSH

As we all know, cloud servers are becoming more and more affordable. Thus more and more clients prefer to use cloud server for their websites. As a developer, it has become inevitable to learn system administration.

SSH is the most commonly used tool to perform various tasks on cloud servers. Times we need to use SSH as a developer:

  • Setup a web server for a client’s website.
  • Deploy source code to a production server.

SSH client

In order to use SSH to access your server remotely, you will need a SSH client on your local machine.

SSH keys: how it works

Generating a SSH-key pair provides you with two long strings: a public and a private key.
You can place the public key on any server and then unlock it by connecting to it with a client who already has the private key.

When the two match, the system unlocks without the need for a password.
You can further increase security by protecting the private key with a passphrase.

The SSH-2 protocol supports several encryption algorithms like RSA, DSA, ECDSA and Ed25519.
The pair of SSH keys consist of:

  • A public key: which is copied to the SSH server(s)
  • A private key: which is stored in the SSH client .

Here are the algorithms and type of SSH key to use and not to use depending on the length of the key:

How to generate SSH keys

The SSH client on Windows 10 and Linux works the same.

  • Open a terminal
  • Stay logged in with the user you want to log into the SSH server as. Don’t use sudo, then type:
ssh-keygen -t rsa

your SSH key pair is generated. You must then transfer the public key to the SSH server, for this you can use ssh-copy-id:

ssh-copy-id <user>@<host>

By Shabazz

Software Engineer, MCSD, Web developer & Angular specialist

Leave a Reply

Your email address will not be published. Required fields are marked *