SSH:Generate Key: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
If you will receive an error saying <code>No such file or directory</code> then, it means you don’t have an [[SSH]] key on your machine. So, move to the next step. Generate the [[SSH]] key pair on the Ubuntu client machine. To generate a new 4096 bits key pair with a user email address as a comment, execute the following command:<syntaxhighlight lang="shell"> | If you will receive an error saying <code>No such file or directory</code> then, it means you don’t have an [[SSH]] key on your machine. So, move to the next step. Generate the [[SSH]] key pair on the Ubuntu client machine. To generate a new 4096 bits key pair with a user email address as a comment, execute the following command: | ||
<syntaxhighlight lang="shell"> | |||
ssh-keygen -t rsa -b 4096 -C "user@email.com" | ssh-keygen -t rsa -b 4096 -C "user@email.com" | ||
</syntaxhighlight>Or<syntaxhighlight lang="shell"> | </syntaxhighlight> | ||
Or | |||
<syntaxhighlight lang="shell"> | |||
ssh-keygen | ssh-keygen | ||
</syntaxhighlight>If you run the above command <code>ssh-keygen</code>, it generates a default 3072-bit RSA key pair. To save the SSH key on the default location in the <code>.ssh/</code> sub-directory, hit <code>Enter</code>. | </syntaxhighlight> | ||
If you run the above command <code>ssh-keygen</code>, it generates a default 3072-bit RSA key pair. To save the SSH key on the default location in the <code>.ssh/</code> sub-directory, hit <code>Enter</code>. | |||
==Source== | ==Source== | ||