Generate SSH key (identity)

To generate SSH key you have to do following:

1. Install any SSH client (if absent).

2. Show existing keys:

ls -la ~/.ssh

It can be empty.

3. Generate key itself:

ssh-keygen -t rsa -b 4096 -C ""

You’ll be prompted to enter the path to store the key. Also, you can enter a passphrase. But it can be empty in some cases.

4. Check for new key:

ls -la ~/.ssh

You’ll see something like:

-rw-r–r– 1 dtv 197121 1679 jun 11 2016 id_rsa
-rw-r–r– 1 dtv 197121 400 jun 11 2016

5. Run SSH agent to add new key:

eval "$(ssh-agent -s)"

6. Add SSH key:

ssh-add ~/.ssh/id_rsa

Thanx to