How to connect with SSH
Overview
SSH provides an encrypted remote shell. You need a server hostname or IP address, a remote username, and either a password or SSH key authorized by that server.
Connect and leave
ssh [email protected]
ssh -p 2222 [email protected]
ssh -i ~/.ssh/id_ed25519 [email protected]
exit
Useful options and tools
-p portselects a non-default port-i keyfileselects a private keyssh-keygen -t ed25519creates a modern key pairssh-copy-id user@hostinstalls a public key when supportedscp file user@host:path/copies a file over SSH
Security
On the first connection, compare the displayed host-key fingerprint with one obtained through a trusted channel. Do not accept an unexpected changed-key warning without investigation.
Protect private keys, use a passphrase, and never share the private key file. Remote commands can be just as destructive as local ones.