Checking for existing SSH key(s)

Firstly, check whether you already have an SSH key pair set up on your local machine. Usually, the SSH keys are stored under a .ssh directory under your home directory:

$ cd ~/.ssh/ && ls -ahltotal 116Kdrwx------  2 dli dli 4.0K Jul 10 10:39 .drwxr-xr-x 94 dli dli  16K Sep 12 18:59 ..-rw-r--r--  1 dli dli  151 Mar  6  2018 config-rw-------  1 dli dli 3.2K Oct  2  2017 id_rsa-rw-r--r--  1 dli dli  740 Oct  2  2017 id_rsa.pub-rw-r--r--  1 dli dli  80K Sep 12 19:08 known_hosts

If you see output similar to this, then you already have an SSH key and can skip ahead to the Adding SSH key to remote server section; otherwise, carry on with creating an SSH key.

A key is basically a very long, random string that acts in place of your ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.