# Using SCP

## What is SCP?

SCP (Secure Copy Protocol) and SFTP (SSH File Transfer Protocol) are two distinct protocols used for file transfer over SSH. SCP is specifically designed for copying files between hosts on a network, SFTP provides a more feature-rich file transfer capability, including file manipulation, directory listing, and more.

If you want to use SCP with an SFTP server, you need to ensure that the server supports both protocols. However, if the server only supports SFTP, you won't be able to use SCP directly with it.&#x20;

{% hint style="success" %}
Couchdrop supports both SFTP and SCP.&#x20;
{% endhint %}

## How to use SCP

Here's how you can use SCP with an SFTP server if the server supports both protocols:

1. **Check Server Support**: First, confirm that the SFTP server you are connecting to supports SCP. Some SFTP servers might have SCP support disabled or not implemented.
2. **Connect with SCP**: If the server supports SCP, you can use the `scp` command just like you would with any other SCP-enabled server. Here's the basic syntax:

   ```bash
   scp source_file username@hostname:/path/to/destination
   ```

   Replace `source_file` with the path to the file you want to transfer, `username` with your username on the server, `hostname` with the hostname or IP address of the server, and `/path/to/destination` with the destination directory on the server.

   For example:

   ```bash
   scp myfile.txt user@example.com:/home/user/
   ```
3. **Authentication**: SCP uses SSH for authentication, so you might be prompted to enter your password or provide a private key passphrase if you're using key-based authentication.
4. **Transferring Files**: Once authenticated, SCP will securely transfer the specified file to the destination directory on the server.
5. **Close Connection**: After the transfer is complete, SCP will close the connection, and you'll return to your local shell prompt.

If the SFTP server does not support SCP, you'll need to use SFTP commands or a dedicated SFTP client to transfer files. Most SFTP servers support a wide range of client applications, making it easy to find one that suits your needs.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.couchdrop.io/walkthroughs/sftp-recipes/using-sftp-clients/using-scp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
