Weblutions Documentation > Knowledgebase > Transfer Files Between Servers

Transfer Files Between Servers

Looking to transfer your files between two Linux servers? Avoid the hassle of downloading and uploading them through FTP and use the SCP command instead.

Secure Copy (SCP) is a command utility that's generally built in with Linux distributions. The command copies files and directories between two servers.

Data and passwords transferred are encrypted with SCP which allows you to securely copy content, and avoid anyone snooping traffic. SCP uses SSH protocol for authentication and encryption.

Copy Files

To copy a single file you should layout the command like this

scp FILE USERNAME@HOST:DESTINATION

Example usage:

scp /home/faxstore/config.json root@127.0.0.1:/home/faxstore

Copy Folder and Files Recursively

To copy a folder and all the sub-folders and files within you can add the recursive parameter to the scp command.

scp -r FILE USERNAME@HOST:DESTINATION

Example usage:

scp -r /home/faxstore root@127.0.0.1:/home/faxstore


Suggest an edit

Review this page

faxes

transfer folder transfer file transfer server

1 recommend this page