> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-sftp.md).

# Integrating with SFTP

Drivetrain connects to your SFTP server using a secure SSH connection with key-based or via username and password based authentication. To begin with the integration, you need to share the following details with us to get started:

### **Required Details**

1. **SFTP Host & Port**: We need the address (hostname or IP) of your SFTP server and the port to use for the connection (default is 22). Eg: [sftp.yourcompany.com:22](http://sftp.yourcompany.com:22)
2. **SFTP Username**: This is used to authenticate our access to your SFTP server. Please configure this user for key-based authentication.
3. **Authentication Method**:

   We recommend **SSH key-based authentication** as the preferred method. Please share your **private SSH key** (with or without passphrase) for the SFTP user above or share the password with us for username-password based authentication
4. **SFTP Folder Path**: This tells us where on your server the files will be placed. Eg: /exports/, /data/outgoing/
5. **File Name(s)**: This helps us identify the file(s) to fetch from the folder. If filenames include dynamic elements like dates or timestamps, please specify the naming format. Eg: orders\_YYYYMMDD.csv, export.csv

### **Best Practices**

1. We recommend creating a **dedicated SFTP user** with restricted access to only the relevant folder.
2. Files should be in a structured format such as **CSV**, **JSON**, or **Parquet** for easier processing.
3. If needed, we can provide our **static IP address** to allowlist in your firewall for secure access.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-sftp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
