See also:
Article

How to scp?

Using the scp command.
Code snippet

Copying files to a remote server can be accomplished with scp.

Examples:

scp -r local_file remoteaddress.com:remote_dir/remote_file

local_file will be copied to the server into remote_dir. The new file will be named remote_file.

Copying a directory

To copy a directory, use the -r (recursive) option:

scp -r local_dir remoteaddress.com:remote_dir

Do you want a new directory to be created inside remote_dir named local_dir or just copy the contents of local_dir into remote_dir directly?

Last updated on 3/5/2020 by Anton Vasetenkov.