The basic command, and what really happens
The simplest SSH invocation is just ssh username@host. The first time you connect to a host, SSH does something important: it shows you the server's host-key fingerprint and asks if you trust it. Saying yes saves the fingerprint into ~/.ssh/known_hosts, and from then on SSH verifies that the server hasn't been swapped under you.
The first-time prompt
You'll see something like:
The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
ED25519 key fingerprint is SHA256:xR4kL9mN2pQ7vW3jH8fT5bY6cZ1dE0gA.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
This is TOFU — Trust On First Use. You're saying "I trust this fingerprint is the real server." Ideally, you've already verified the fingerprint through a different channel. In a small home/office fleet, you typically just type yes.
The ~/.ssh directory
All SSH client state lives in ~/.ssh/:
| File | Purpose |
|---|---|
~/.ssh/config | Your client config (Track 3 covers this in depth) |
~/.ssh/id_ed25519 | Your private key (KEEP SECRET) |
~/.ssh/id_ed25519.pub | Your public key (safe to share) |
~/.ssh/known_hosts | Fingerprints of servers you've connected to |
~/.ssh/authorized_keys | Public keys allowed to log in (server side) |