Knowledgebase
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 sh scp FILE USERNAME@HOST:DESTINATION Example usage: sh 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