# SSH Keys and ~/.ssh/config

An SSH key pair logs you in without a password: ssh-keygen makes a private key that stays on your computer and a public key you hand out, ssh-copy-id puts the public key on a server, and a Host block in ~/.ssh/config gives the server a short name.

![Cheat sheet for the lesson SSH Keys and ~/.ssh/config: An SSH key pair logs you in without a password: ssh-keygen makes a private key that stays on your computer and a public key you hand out, ssh-copy-id puts the public key on a server, and a Host block in ~/.ssh/config gives the server a short…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/5b07308533e54ccf966d72c61d082b77.webp)

- Category: Bash
- Level: Journeyman
- Tags: linux, private-key, public-key, ssh-config-file, ssh-copy-id, ssh-key, ssh-keygen, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-ssh-keys-cheat-sheet
