SCP, my beloved
What is SCP?
SCP is a program shipped with OpenSSH, allowing you to copy files between two hosts over a network. Since it’s shipped with OpenSSH, it should be available on most of your computers, making it convenient to use. For SCP to work, you need to point it to a running SSH server. Now let’s look at some examples of how to use SCP.
How to use SCP:
Copying a local file to a remote host:
scp localFile user@remotehost:path/to/target
And in reverse:
scp user@remotehost:path/to/remotefile /path/to/target
To transfer whole folders, just point to a directory and use the -r
flag to let scp run recursive.
In short, SCP simplifies file transfers with its straightforward approach. Next time you’re stuck, remember SCP—it’s a lifesaver.
Thoughts, feedback, questions? I would like to hear about them! Just drop me an email at hello[at]confusedalex.dev
Webmentions
No webmentions yet. Be the first to comment, like or repost!