SCP or Secure Copy Protocol is an SSH-based protocol that permits sharing of files between remote devices. SCP allows you to send and receive file from and to a local device or between remote devices.
To copy a folder from a remote server to your local machine using scp (Secure Copy), you can use the following command:
scp -r user@remote:/path/to/remote/folder /path/to/local/destination.
Here's an explanation of the command:
- scp: This is the command for secure copying.
- -r: This option specifies that the source is a directory and should be copied recursively.
- user: Replace this with your username on the remote server.
- remote: Replace this with the hostname or IP address of the remote server.
- :/path/to/remote/folder: Replace this with the absolute path to the folder on the remote server that you want to copy.
- /path/to/local/destination: Replace this with the absolute path to the destination folder on your local machine where you want to save the copied folder.