Skip to content
Luigi Ferrari edited this page Mar 20, 2022 · 8 revisions

SSH Overview

SSH keys are a matching set of cryptographic keys which can be used for authentication. Each set contains a public and a private key. The public key can be shared freely without concern, while the private key must be vigilantly guarded and never exposed to anyone.

Get Started

To generate a SSH Key just type in the terminal the following command:

ssh-keygen -t ecdsa

img

Flags

t - The type of key to be created. SSH Algorithms
b - The number of bites to be generated in the key.

If you just type ssh-keygen, for default will create a key of the type rsa. You don't wanna do that.

This generated a public and a private key files in ~/.ssh folder.

Go to the folder and copy the content of the public key .pub.

cd ~/.ssh && cat id_rsa.pub

img

Then go to the vlogsphere SSH key and paste it.

  1. intra > settings > SSH key > New SSH Key.

  2. Paste the public key in the white box and submit.

img

Now we are able to clone any project avaliable for us as we want.

git clone <git-vlogsphere-link> libft

img

If you want to have access in more than one computer you can just copy the private key and then paste it in ~/.ssh folder of the new computer.

cd ~/.ssh && cat id_rsa

And then change the default permissions as follow:

chmod 600 *

SSH Algorithms

rsa - an old algorithm based on the difficulty of factoring large numbers. A key size of at least 2048 bits is recommended for RSA; 4096 bits is better. RSA is getting old and significant advances are being made in factoring. Choosing a different algorithm may be advisable. It is quite possible the RSA algorithm will become practically breakable in the foreseeable future. All SSH clients support this algorithm.

dsa - an old US government Digital Signature Algorithm. It is based on the difficulty of computing discrete logarithms. A key size of 1024 would normally be used with it. DSA in its original form is no longer recommended.

ecdsa - a new Digital Signature Algorithm standarized by the US government, using elliptic curves. This is probably a good algorithm for current applications. Only three key sizes are supported: 256, 384, and 521 (sic!) bits. We would recommend always using it with 521 bits, since the keys are still small and probably more secure than the smaller keys (even though they should be safe as well). Most SSH clients now support this algorithm.

ed25519 - this is a new algorithm added in OpenSSH. Support for it in clients is not yet universal. Thus its use in general purpose applications may not yet be advisable.

side

Clone this wiki locally