ssh-keygen -t ed25519 -C "[email protected]"
This creates two files by default:
~/.ssh/id_ed25519 (private key — never share this)~/.ssh/id_ed25519.pub (public key — safe to share)ssh-copy-id user@remote-host
This appends your public key to ~/.ssh/authorized_keys on the remote host, enabling passwordless login.
ssh user@remote-host
ssh -i ~/.ssh/id_ed25519 -p 2222 user@remote-host
Every server you connect to gets fingerprinted in:
cat ~/.ssh/known_hosts
scp localfile.txt user@remote-host:/home/user/