Home › Linux Administration & Deployment
SSH is how you administer remote Linux machines. Use key-based authentication and disable passwords. Task Command Generate a key ssh-keygen -t ed25519 -C "you@laptop" Install it on a server ssh-copy-id user@host Connect ssh user@host, ssh -p 2222 -i key user@host Copy files scp file user@host:/tmp/, rsync -avz dir/ user@host:/srv/dir/ Port forward ssh -L 5433:localhost:5432 user@db (local DB tunnel) Jump host ssh -J bastion user@private-host Agent ssh-add + ForwardAgent only to trusted hosts Harden sshdconfig PasswordAuthentication no, PermitRootLogin no, AllowUsers deploy alice, then sudo systemctl reload ssh. Add fail2ban to block brute-force attempts. Keep a second session open while changing SSH config so you can't lock yourself out.