Skip to content

Instantly share code, notes, and snippets.

@abenrob
Created September 5, 2016 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abenrob/d6fce51588c7e8a9f2521dc99bd66fba to your computer and use it in GitHub Desktop.
Save abenrob/d6fce51588c7e8a9f2521dc99bd66fba to your computer and use it in GitHub Desktop.

SSH setup

Create keypair

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/demo/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/demo/.ssh/id_rsa.
Your public key has been saved in /home/demo/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a
The key's randomart image is:
+--[ RSA 2048]----+
|          .oo.   |
|         .  o.E  |
|        + .  o   |
|     . = = .     |
|      = S = .    |
|     o + = +     |
|      . o + o .  |
|           . o   |
|                 |
+-----------------+

display public key in terminal (to copy)

cat ~/.ssh/id_rsa.pub

add private key to ssh-client keychain

ssh-add -K ~/.ssh/id_rsa.pub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment