> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/sftp-key-based-auth.md).

# SFTP (key-based auth)

### 1. The "Enterprise Compliance Pass" (Overview)

Bank-grade file transfers. Connect to heavily regulated partners without ever using a password.

Use this node when your partner requires stronger access controls for finance, healthcare, or government data exchange. It is a strong fit for environments reviewed against **PCI-DSS**, **HIPAA**, and **SOC 2** standards, where password-only access is often not allowed.

### 2. How to Add the Node

Click on your canvas, search for **SFTP (key-based auth)**, and add it to your workflow.

<figure><img src="/files/jIP2erF8zc1HuHUdt70s" alt=""><figcaption></figcaption></figure>

### 3. What can you automate? (The "Wow" Use Cases)

1. **The Bank Recon:** Push sensitive settlement files to a partner bank using strict key-based access.
2. **The Healthcare Bridge:** Exchange HIPAA-aligned patient files with healthcare partners more securely.
3. **The Regulator Portal:** Auto-submit compliance reports to government servers that do not allow password logins.

### 4. Step-by-Step: Configuration & Smart Data Injection

#### **Set up the connection**

Add your partner server details in the connection settings:

* **Host**
* **Port** : use `22`
* **Username**
* **Private Key**
* **Passphrase** — only if your key is protected

The **Private Key** is the physical key you paste into Diaflow. The **Public Key** is the lock you send to your partner so they can authorize your access.

<figure><img src="/files/dpxMJVEpfob8XmbQMMPd" alt=""><figcaption></figcaption></figure>

#### **Build dynamic file paths**

Type `@` inside the path field to open the visual data picker. Use it to insert dates, customer IDs, partner codes, or report numbers into the file name automatically.

This helps you keep every upload unique and traceable.

### 5. The Output: Seeing Your Results

For uploads, the node returns a success result so you know the file handoff completed.

For directory watching, the node returns the details of the new or changed file so the next step can react automatically.

### 6. Golden Rules & Guardrails (CRITICAL PRO-TIPS)

* **The Key Rotation Rule (Crucial):** Enterprise partners often require key changes every `90 days`. Put it on your calendar. When they rotate the key, you must update your Diaflow connection or your workflow will fail.
* **The Public Key Reminder:** Pasting your **Private Key** here is not enough. You must email the matching **Public Key** to your partner's IT team so they can authorize you.
* **The Overwrite Trap & Folder Rule:** If you reuse the same file name, you may replace yesterday's file. Use `@Date` or another dynamic value in the file name, and make sure the destination folder already exists before you run the workflow.

### Need help?

* Read [What is Diaflow?](/workflow-builder/overview.md)
* Browse the [Component List](/workflow-builder/component-list.md)
