How Do I Copy Files from One Linux Server to Another Using Scp?
Contents

To copy a directory (and all the files it contains), use scp with the -r option. This tells scp to recursively copy the source directory and its contents. You’ll be prompted for your password on the source system ( deathstar.com ). The command won’t work unless you enter the correct password.

How do I copy from one Linux server to another?

If you administer enough Linux servers you are probably familiar with transferring files between machines, with the help of the SSH command scp. The process is simple: You log into the server containing the file to be copied. You copy the file in question with the command scp FILE [email protected]_IP:/DIRECTORY.

How do I scp multiple files from one server to another?

16 Answers. You can copy whole directories with using -r switch so if you can isolate your files into own directory, you can copy everything at once. As Jiri mentioned, you can use scp -r [email protected]:/some/remote/path /some/local/path to copy files recursively.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest