#SSH
SSH is the “Secure Shell,” a way to securely log in to a remote machine, without worrying that your communications with the server have been compromised.

SSH Keys

SSH uses what’s known as a “key pair” to communicate securely. The key pair consists of two keys, one public and one private. The public key can be distributed freely, without worry. You can safely email it, post it on your blog, send it though a chat program, without fear of weakening the security of your systems.
(You can even give your key to a friend, have them add it to their list of authorized keys and securely log in as them.)
The private key, however, must be kept secure and never shared.
SSH Keys can of course be used with the SSH program, a kind of remote terminal, but they also can be used for authentication with sites like GitHub.

Installing SSH

If you’re using a Linux system or a Mac, you already have SSH. If you’re on Windows and haven’t done so already, install the Git Bash package for Windows.

Generating your key pair

Open up your terminal and type the following:

1
ssh-keygen -b 4096

This will start generating a key pair with a strength of 4096 bytes. It will ask you where you want to save the pair–just go with the default for now and hit enter.

1
2
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jim/.ssh/id_rsa):

Next, you’ll be asked for a passphrase. Type in a good one,but don’t forget it, as it is not recoverable. You will not see the characters you type. Hit enter when you have finished:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Enter passphrase (empty for no passphrase): 
Enter same passphrase again:
Your identification has been saved in /home/jim/.ssh/id_rsa.
Your public key has been saved in /home/jim/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:AnTr5ic/uboTpW1vxxpnOAxWB3a03usbALr9FLQ2AM4 jim@localhost
The key's randomart image is:
+---[RSA 4096]----+
| . . . o.o |
| . . + o o . |
| . . E + + |
| o .o * o |
| ++S B . |
| oooo= o + . |
| oooo*.+ o |
| .+o oBo. . |
| o+o+.o. o. |
+----[SHA256]-----+