How to Generate SSH Keys
- Open terminal and enter the command below to launch the process of generating SSH keys:
$ ssh-keygen -o -b 4096 -t rsa
2. While the keys are generated, you will be asked to enter path to where the keys should be stored (the default is /home/user/.ssh/id_rsa).
3. Then you will be asked to enter passphrase for you key (not mandatory, but recommended).
4. Finally you will be shown paths to id_rsa (contains private key) and id_rsa.pub (contains public key, which you will need to upload to your server to use it) files.
- Download PuTTY zde
- Start PuTTYgen
Start menu -> All Programs -> PuTTY -> PuTTYgen
- Make sure option RSA is chosen in the lower part of window and they key length is 4096 instead of 2048. Then click Generate.
- While the keys are generated move, your mouse in random directions (this is used as a source of randomness for the generation process).
- When the generation finishes, you will be shown public key (which you will need to upload to your server) in a separate window.
- Then set Key comment to something, that will help you to identify the public key. For example mail of the owner. You can enter private key passphrase for enhanced security (not mandatory, but recommended).
- Lastly, click Save Public Key and Save Private Key to save the keys.