Copying and tunnels
bash
# copying files
scp file user@host:/path/ # to the server
scp user@host:/path/file . # from the server
scp -r dir user@host:/path/ # a directory
rsync -avz dir/ user@host:/path/ # more efficient for large/repeated transfers (see rsync)
# port forwarding
ssh -L 8080:localhost:80 user@host # local 8080 → remote 80
ssh -D 1080 user@host # SOCKS proxy through the server
ssh -J bastion user@internal-host # jump through a bastion