Sometimes I just want to copy a file to my VPS, run a program to process it in some way, and copy it back to my local machine. With scp that’s as easy as…
# Copy to server
scp <path/to/local/file> <user>@<server>:</path/to/remote/directory>
# Copy from server
scp <user>@<server>:</path/to/remote/directory> <path/to/local/directory>