SSH create key

Revision as of 23:05, 20 March 2016 by WikiFreak (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


How-to generate SSH private / public keys

The following settings are based on the ANSSI (French security entity) - 2014/11. See http://www.ssi.gouv.fr/entreprise/guide/recommandations-pour-un-usage-securise-dopenssh/


Linux

Create key

1. Log-in with the user you want to use.


2. Generate a pair of authentication keys.

# Generating public/private rsa key pair
ssh-keygen -t ecdsa -b 256 -f username.ssh


Output details

  • username.ssh == private key
  • username.ssh.pub == public key


Convert OpenSSH key to Windows Putty

See: http://meinit.nl/using-your-openssh-private-key-in-putty


Windows

You can generate private / public keys with PuttyGen = Putty key generator.


puttyGen first step


When the keys are OK, you have to enter a key pass-phrase. Your pass-phrase must be:

  • long (> 15 characters)
  • hard to guess
  • with letters + signs + numbers


Reminder

how to choose your passphrase and protect it: http://www.alcf.anl.gov/resource-guides/user-authentication-policies


PuttyGen 2nd step


Then, save your keys! You should be the only one to access the save location.




References

Source:

Windows - putty software: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html


How to transform a SSH key into Windows Putty: http://meinit.nl/using-your-openssh-private-key-in-putty