SCP (Secure Copy Protocol) is a command-line utility that allows securely transfer files between hosts on a network. It uses SSH for data transfer and provides the same authentication and security.

Upload a file to a remote server

scp /path/to/local/file.txt username@remote_host:/path/to/destination/

Download a file from a remote server

scp username@remote_host:/path/to/remote/file.txt /path/to/local/destination/

Transfer an entire directory

scp -r /path/to/local/directory username@remote_host:/path/to/destination/

Specify a different port

scp -P 2222 /path/to/local/file.txt username@remote_host:/path/to/destination/