Secure copy files on VPS or dedicated server with SCP

Most of the time if you are using a VPS hosting server or own dedicated server you will need to copy a single file, group of files or whole folder to another remove VPS or dedicated server. You can use the old good one FTP way just when uploading files to the remote server. But there is a lot easier and secure way to transfer files between servers with SCP (Secure Copy Program).

When you like to copy a single file from one VPS or dedicated server to another one you can use the following SSH command:

scp file.tar [email protected]:/your/directory/

To copy a whole folder between servers you can run the following SSH command:

scp -r folder [email protected]:/your/directory/

When using SCP the server will ask you for the password for the username on the new VPS hosting server or dedicated server (unless you have setup trust between servers with authentication keys). If you like to see all of the command options from shell just type "man scp" in the VPS or dedicated server SSH console. This SSH command will show you the SCP manual with all options you can use like changing server ports and more SCP parameters.

To use SCP you need to have on your VPS hosting server or dedicated server Shell (SSH) access enabled.

  • 52 Users Found This Useful
Was this answer helpful?

Related Articles

How to install .deb file in Debian

Once you have downloaded .deb file in your virtual private server or dedicated server, you can...

How to edit crontab in Ubuntu

For more detail information,you can man crontab Use crontab To open...

Buy VPS with CashU

Buy VPS with CashU VPS Hosting Services The internet has made it easy for people to communicate...

How to setup the VPS hosting server to use quotas

All provisioned VPS hosting servers have already enabled full disk quota support. So there is not...