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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay