Lesson 26 / 29

SSH Basics

Logging into a remote machine securely.

What SSH does

SSH (Secure Shell) opens an encrypted terminal session on a remote machine, so you can run commands as if you were sitting in front of it.

Connecting

ssh user@host connects and prompts for a password (or uses a key).

ssh alice@192.168.1.20
ssh alice@myserver.com -p 2222   # custom port

Keys beat passwords

ssh-keygen creates a key pair; ssh-copy-id user@host installs your public key so future logins skip the password entirely.