Using scp to send files to/from our server
To send files to and from our server, we’ll use the command.
Note: You always run from your local machine. Always. Always. Don’t ever run it on your server, it won’t do anything!
Intro to
stands for secure copy, and is based off of the (copy) command. To understand , it might help to get a grip on .
Copy works like this, to reproduce a file called as
or like this, to copy a file from to the Desktop.
All does is add in *where the computer is. The following command copies a file from Downloads the the Desktop, **except the first file is located on another machine.
When we use we also pass and the location of our key.
Sending a file to our server
From your local machine, run this command to copy from your machine to the remote machine.
Taking files from the server
From your local machine, run this command to copy from the remote machine to your machine.
Taking MULTIPLE files from the server
A lot of the time you’re saving a million and one files on the server - , , , , etc. You can use the wildcard just the same as if you were using a normal command-line tool.
This will take every file that starts with and ends with from our home directory on the server, and copy them to our current directory on our local machine - that’s the .
-
-
-