scp - OpenSSH secure file copy
scp [-r] [-q] SOURCE... TARGET
Options you will use
host:path- a remote path; relative paths start in the remote home directory
-q- no progress meter
-P PORT- Port on the remote host (capital P - ssh uses -p).
-i FILE- The private key to use.
-o OPTION- An ssh_config option.
-p- Preserve modification times and modes.
-C- Compress.
-J JUMP- Go through a jump host.
Examples
$ scp cp-1:.kube/config ~/.kube/configcopy the admin kubeconfig to oncall-lab (after copying it to your home on cp-1)
Gotchas
- scp runs as you on the remote side: root-only files like /etc/kubernetes/admin.conf give "Permission denied" - copy with sudo to your home there first.
Taught in
Try scp in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.