# OpenSSH SFTP

OpenSSH, which is a suite of secure networking utilities based on the SSH (Secure Shell) protocol, includes a command-line utility for interacting with SSH servers for file transfer purposes. This utility is simply called `sftp`.

## How to use OpenSSH SFTP

Here's a brief overview of how to use the `sftp` command:

1. **Connecting to a Server**:
   * To connect to an SSH server using SFTP, you would typically use the following command:

     ```bash
     sftp username@hostname
     ```
   * Replace `username` with your username on the server and `hostname` with the hostname or IP address of the server.
2. **Authenticating**:
   * After executing the command, you will be prompted to enter your password for the specified username.
3. **Navigating Directories**:
   * Once connected, you'll be in the SFTP interactive shell, similar to a command-line interface.
   * You can use commands like `ls`, `cd`, and `pwd` to navigate directories on the server.
4. **Transferring Files**:
   * To upload a file from your local machine to the server, you can use the `put` command:

     ```arduino
     put localfile.txt
     ```
   * To download a file from the server to your local machine, you can use the `get` command:

     ```arduino
     get remotefile.txt
     ```
5. **Exiting SFTP**:
   * To exit the SFTP session, you can use the `exit` command:

     ```bash
     exit
     ```
   * Or simply type `exit` and press Enter.

The `sftp` command-line utility provides a straightforward way to perform secure file transfers over SSH connections without needing a separate FTP client. It's often used in scripting and automation tasks where manual interaction isn't required.

\
Using OpenSSH SFTP with Couchdrop
---------------------------------

Couchdrop supports the default **sftp** command natively. Simply switch out the hostname and credentials from the example above.

```bash
sftp user-s122@companyx.couchdrop.io
```


---

# 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/openssh-sftp.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.
