SCP (Secure copy protocol) is an SSH-based tool for transferring files between machines in local and wide area networks. It is a safe and quick way to exchange data.
Copying to a Remote Machine
The following command copies the file testfile.html from the local machine to the home directory of the user student on the server with the address specified address 11.22.33. Instead of the home directory (~/), any other target can be specified:
Add the -r flag to copy a directory recursively:
Copying From a Remote Machine
To copy a file from a remote server, the arguments' order needs to be swapped. The dot (.) copies the data to the recent directory. Any other path can be used as target.
Create a text file in your personal directory on the server. Copy it to your local machine using the SCP command from your local machine.