To copy a folder from a remote server to your local machine using scp, you can use the following command:
scp -r user@remote_host:/remote/directory/path /local/directory/path
Replace user
with your username on the remote server, remote_host
with the IP address or hostname of the remote server, /remote/directory/path
with the path to the folder you want to copy on the remote server, and /local/directory/path
with the path to the destination folder on your local machine.
Make sure to include the -r
flag to recursively copy the entire folder and its contents.
For example, if you want to copy a folder named “example_folder” from the remote server to your current directory on your local machine, and your username on the remote server is “username” and the IP address is “192.168.1.100”, you would use the following command:
scp -r [email protected]:/path/to/example_folder .
This would copy the “example_folder” and all its contents to your current directory on the local machine.