How To Generate RSA Keys with Ssh Keygen? – POFTUT

How To Generate RSA Keys with Ssh Keygen?

Ssh provides secure access to the remote system. The traffic between systems are encrypted using encryption algorithms. There are different encryption algorithms. RSA is the most popular asymmetric encryption algorithm. In this tutorial we will look how to create RSA keys with ssh-keygen

RSA History

RSA algorithm is created by researchers named Ron Rivest, Adi Shamir and Leonard Adleman in the MIT. And named with their names first letters. It is asymmetric or public encryption algorithm provides a lot of flexibility. We can generate different size of keys with RSA. RSA is used to make secure SSH, OpenGP, S/MIME, SSL/TLS etc.

Generate RSA Key with Ssh-keygen

Actually ssh-keygen will create RSA keys by default. So we do not have to specify the algorithm but in order to be sure and provide information we can explicitly specify the RSA key creation. We will use -t option in order to specify the RSA algorithm.

Generate RSA Key with Ssh-keygen

Generate RSA Key with Ssh-keygen

Generate RSA Key To Different Path

By default RSA key is generated into user home directory ~/.ssh/id_rsa . We can change this default directory during the generation or by providing the path as parameter. We will use -f option in order to change path and file name. We will create key named test in to the current working directory.

Generate RSA Key To Different Path

Generate RSA Key To Different Path

There will be two files named;

  • test is the private key
  • test.pub is the public key
LEARN MORE  OpenPGP Mail Encryption and Related Tools For Linux, Windows

1 Response

  1. 04/10/2019

    […] order to manage the RSA key, we need to create it first. we specify the output type where it is a file named t1.key and the […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)