Copy files to your remote server and vice versa with scp

in Categories: Linux, SSH.

1 minute read

Here is how to copy files on your remote server and vice versa.

Run the commands on your local computer, not from VPS or on your server.

Upload (from local to VPS):

You can upload a file to the server with the following command:

scp ./local-file user@your-vps-ip:/path/to/remote/directory

Download (from VPS to local):

To download a file from a server, you can run a following command:

scp user@your-vps-ip:/path/to/remote/file ./local-directory

In any case:

To upload and download files this way, you may need to have SSH installed and configured.

This article has been published under the following tags:

Did you find this article useful?

You already voted!