Generate a new public private keypair
ssh-keygen
Explore your public and private key
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa
ssh ubuntu@IP
or
git clone [email protected]:100xdevs-cohort-3/week-24-deposit-with-infra.git (try a private repo)
Check authorized_keys
cat ~/.ssh/authorized_keys
Put your public key in your friends laptop as an authorized key.
The ssh-keygen
tool can generate SSH key pairs using several different cryptographic algorithms, depending on what you choose during the key creation process. By default, it typically uses RSA, but you can specify other algorithms as well. Here are the most commonly used algorithms:
ssh-keygen
tool uses RSA by default when creating keys.