Wednesday, 27 August 2014

ssh keygen create rsa key

In case that you want to create rsa ssh keys use following command

root@ubuntus1:~/.ssh# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
96:03:9f:05:26:c5:e6:72:30:fc:85:61:41:8a:c8:34 root@ubuntus1
The key's randomart image is:
+--[ RSA 2048]----+
|  E  ..+O+       |
| o o .+=+..      |
|  o . o* ..      |
|      .o++       |
|       oS        |
|       . .       |
|                 |
|                 |
|                 |

root@ubuntus1:~/.ssh# ls

Key has two parts: public( and private (private). You create rsa ssh keys in case that you want to exchange keys with other servers so that you can login with no password. You only exchange public part of key.

No comments: