← All bricks

ssh · Beginner

ssh, scp & rsync: Remote Access from the Command Line

Reach remote machines with confidence — connect over SSH, run commands and tunnels, set up keys and an SSH config, then copy and sync files with scp and rsync.

Every server you'll ever touch is one SSH connection away, and the command line is where that connection lives. This course starts at a bare shell and builds real fluency one small step at a time: connecting and trusting a host key, running remote commands, generating and installing keys so you never type a password again, and shaping an SSH config that turns long commands into short aliases. From there we add the moves that make SSH feel like a superpower — port forwarding, jump hosts, agent forwarding — and finish with copying and syncing files using scp and rsync, ending on a real deploy. Setting something up and using it are taught as separate steps, so each idea lands on its own.

What you'll build

  • Connect over SSH and trust host keys safely
  • Run remote commands and open tunnels
  • Generate ed25519 keys and install them with ssh-copy-id
  • Turn long connections into short aliases with an SSH config
  • Copy files with scp and sync trees with rsync
  • Combine the tools into a real command-line deploy

Contents

  1. Check your tools
  2. Connect for the first time
  3. Look around, then leave
  4. Run a command without staying
  5. Reach a non-standard port
  6. Generate a key pair
  7. Look at the public half
  8. Install the key on the server
  9. Connect with no password
  10. Start an agent
  11. Add your key to the agent
  12. See what the agent holds
  13. Write a config
  14. Connect by alias
  15. Point at a specific key
  16. See why a connection behaves
  17. Find a host's stored key
  18. Forget a changed key
  19. Forward a local port
  20. Forward a port the other way
  21. Hop through a jump host
  22. Forward your agent — carefully
  23. Copy a file up
  24. Copy a file down
  25. Copy a whole directory
  26. Copy over a non-standard port
  27. Sync a directory with rsync
  28. Preview before you sync
  29. Make the destination match exactly
  30. Watch a large transfer
  31. Choose the transport
  32. Leave things out
  33. Resume an interrupted transfer
  34. A real deploy in one line
  35. Make it your own