Generating Your SSH public Key
- User's SSH keys are stored in that user's ~/.ssh directory.
$ ls ~/.ssh
id_rsa id_rsa.pub known_hosts
- The id_rsa.pub file is your public key, and the other file id_rsa is your private key
- If you don't find id_rsa, id_rsa.pub OR you don't even have ~/.ssh directory, create them using a program called ssh-keygen which is provided with the SSH package on Linux systems and comes with the MSysGit package on Windows.
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jshankar/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/jshankar/.ssh/id_rsa.
Your public key has been saved in /home/jshankar/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| . .E|
| + . B .|
| . S . = o |
| . + o o|
| o . o *+|
| . .. . +oo|
| .. .o.. |
- First, it confirms where you want to save the key (~/.ssh/id_rsa), and then it asks twice for a passphrase, which you can leave empty if you don't want to type a password when you use the key.
- After creating the SSH public key (id_rsa.pub) file, please e-mail this file to email@example.com OR firstname.lastname@example.org.