Generate SSH keys

Hi cloud!

Today I explain how to generate public/private keys. This is very useful for a lot of services that require something more secure than a typed password. The most common usage for private Key is the ssh connection. If we use private key we will never need to type password again, saving hundreds of hours and more than one security problem.

How we can create our new key?

 $ ssh-keygen 

Generating public/private rsa key pair.
Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/ubuntu/.ssh/id_rsa.
Your public key has been saved in /home/ubuntu/.ssh/
The key fingerprint is:
a1:04:aa:73:5a:8f:24:14:70:24:ca:30:37:ca:92:c1 ubuntu@ip-10-22-22-22
The key's randomart image is:
+--[ RSA 2048]----+
|Oo= .            |
|=E.o .           |
|=+.   . .        |
|o.   . . .       |
|+ +   . S        |
| B o             |
|. . .            |
|                 |
|                 |

That’s it! We will have our key generated. We can find them at ~/.ssh/ (Public key) and ~/.ssh/id_rsa (Private key). The private key is the file you NEVER provide to anyone. And remember to get correct permisions (600). If not, you will be noticed of incorrect permissions.

To change that permissions:

 $ chmod 600 ~/.ssh/id_rsa 

In next posts we will explain new techniques to save even more time in your normal commands.

But this will be in a few days!

Stay cloud!

Uso de cookies

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies y la aceptación de nuestra política de cookies, pinche el enlace para mayor información.plugin cookies