SCP from local to remote

scp file.zip root@18.216.120.253:/var/www

If you ever find yourself needing to move files or folders from your local machine up to a remote server, you can do so using the SCP command. Your remote server will need to have your public key and then you can run the following command:

scp file.zip root@18.216.120.253:/var/www

In the command above, after the scp command you will then pass the file file.zip you with to move to your remote server.

After the file you will specify the user@ip_address, then add a :, and the location of where you want to move that file on the server /var/www

If you wish to move a folder recursively up to your server you will want to pass the -r flag like so:

scp -r folder_name root@18.216.120.253:/var/www
BETA Snippet explanation automatically generated by OpenAI:

No explanation generated yet.

Snippet By Dev Dojo

·

Created June 12th, 2021

·

Report Snippet