SSH Keys

It’s a setup

Create the key locally

ssh-keygen -t rsa -b 4096

Give it a name to identify its use (e.g. “my_key_rsa”).

Avec le vide les pleins pouvoirs

The passphrase can be anything you remember, even if that’s nothing (the passphrase can be blank).

Insert the key in the remote host

pbcopy < ~/.ssh/my_key_rsa.pub

This “copies the contents of the “Public Key” file to your clipboard. You’ll paste it into a field supplied by the remote host.

Config the local

Use an SSH Config file create an alias for the new key. Create the config if necessary.

cd ~/.ssh && touch config && nano config

Input the credentials. Replace text in brackets with your details.

Host [my_alias]
    User [user]
    HostName [url]
    IdentityFile ~/.ssh/[my_key_rsa]

Sources

  1. https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
  2. https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
  3. http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/