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)

Screenshot 2025-01-25 at 7.36.10 PM.png

Check authorized_keys

cat ~/.ssh/authorized_keys

How to hack your friends laptop?

Put your public key in your friends laptop as an authorized key.

Algorithms for public key cryptography

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:

1. RSA (Rivest–Shamir–Adleman)

2. Ed25519