Ssh is secure protocol used to manage remote systems like Linux, BSD, UNIX, network devices event windows operating systems. The traffic between systems are encrypted. Ssh uses asymmetric keys in order to encrypt and made traffic invisible to the others those resides between systems in the network. The encryption power comes from key bit size or length. In this tutorial we will look how to create 4096 bit keys.
Generate 4098 Bit Key
In this example we will generate very secure key. This key size will be 4096 bit. 4096 bit keys are a lot more secure than 2048 or 1024 bit keys. If we are not transferring big data we can use 4096 bit keys without a performance problem. We will use
-b option in order to specify bit size to the
$ ssh-keygen -b 4096
Generate 4096 Bit DSA Key
RSA is very old and popular asymmetric encryption algorithm. It is used most of the systems by default. There are some alternatives to RSA like
DSA . We can not generate 4096 bit DSA keys because it algorithm do not supports.
Generate 2048 Bit Key
The default key size for the
ssh-keygen is 2048 bit. We can also specify explicitly the size of the key like below.
$ ssh-keygen -b 2048
Generate 1024 Bit Key
The less secure key size is 1024 bit. We do not recommend usage of this size of keys but in some situations like old systems we may need this size of keys. Here how we can generate
1024 bit key with
$ ssh-keygen -b 1024