SSH create key

Revision as of 15:21, 8 August 2014 by WikiFreak (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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 keys.

# Generating public/private rsa key pair
ssh-keygen -t rsa

>> Enter file in which to save the key: /home/user/.ssh/id_rsa

Log sample:

Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4


Summary

  • id_rsa == private key
  • id_rsa.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