SSH
5 min read
SSH connects to remote servers: ssh user@host. Set up key-based login with ssh-keygen and ssh-copy-id for passwordless access. Save shortcuts in ~/.ssh/config with Host, HostName, User, and IdentityFile.
SSH — Secure Shell
# Connect
ssh alice@192.168.1.10
ssh -p 2222 user@server
# Key-based auth (more secure)
ssh-keygen -t ed25519 # generate key pair
ssh-copy-id user@server # copy public key to server
# Shortcut in ~/.ssh/config
Host myserver
HostName 192.168.1.10
User alice
IdentityFile ~/.ssh/mykey
ssh myserver # use the shortcut