DEV Community

Francisco Cornejo Garcia
Francisco Cornejo Garcia

Posted on

How to Send Files over SCP

SCP means Secure Copy Protocol, a network protocol that copies data from one remote place to another through a secure connection. Let's copy a file from one place to another.

To scp a file over, you must include a source and a destination.

scp [source] [destination]
Enter fullscreen mode Exit fullscreen mode

For the source, you type a file path to the file you want to copy.

For the destination, you type the username and host of the remote device to connect to.
Then, you type the file path to the destination you want your file to be in.

scp /path/to/file username@host:/path/to/destination
Enter fullscreen mode Exit fullscreen mode

You can use a port number too.

scp -P 80 /path/to/file username@host:/path/to/destination
Enter fullscreen mode Exit fullscreen mode

To learn more, you can always man scp for more details.

What esoteric terminal command did you discover?

Top comments (0)