Back

SSH basics

SSH lets you securely connect to another computer, like a server, from your terminal. It's also how you can push to GitHub without typing a password. You make a key pair: the private key stays on your machine, and the public key goes on the server or GitHub.

# Create a key pair
ssh-keygen -t ed25519 -C "you@example.com"

# Copy the public key (add it in GitHub -> Settings -> SSH keys)
cat ~/.ssh/id_ed25519.pub

# Test the GitHub connection
ssh -T git@github.com

# Connect to a server
ssh user@203.0.113.10

Roadmap