Difference between revisions of "SSH create key"
(Created page with "Category:Linux =How-to generate SSH private / public keys= ==Linux== ===Create key=== 1. Log-in with the user you want to use. 2. Generate a pair of authentication...") |
|||
Line 3: | Line 3: | ||
=How-to generate SSH private / public keys= | =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/ | ||
Line 16: | Line 18: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Generating public/private rsa key pair | # Generating public/private rsa key pair | ||
− | ssh-keygen -t | + | ssh-keygen -t ecdsa -b 256 -f username.ssh |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ''' | + | '''Output details''' |
− | * | + | * username.ssh == private key |
− | * | + | * username.ssh.pub == public key |
Latest revision as of 23:05, 20 March 2016
Contents
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.
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
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