# Managing files with SFTP

> **Secure File Transfer Protocol** (**SFTP**) is a secure, encrypted method for transferring files between computers over a network, acting as an extension of the Secure Shell (SSH) protocol. It replaces older FTP by encrypting commands and data to prevent password sniffing and man-in-the-middle attacks.

## Overview

<figure><img src="/files/1QDDB2kBBUmfoA6KVy8e" alt=""><figcaption></figcaption></figure>

Termius supports SFTP across all its major platforms, including Windows, macOS, Linux, iOS, and Android. It includes:

* **Dual-pane interface on the desktop:** manage local or remote files side-by-side
* **Transfer files**: transfer files between the selected hosts, including drag-and-drop support
* **Mobile support:** open multiple SFTP tabs on iOS and Android, which allows you to have multiple file transfer sessions open simultaneously
* **Integrated workflow:** switch between a terminal session and an SFTP session for the same host with a single click
* **File editing:** download files for editing with further changes tracking and file upload

{% hint style="info" %}
Termius from the Mac App Store and Snap Store is sandboxed and has limited access to the file system. If you need to manage local files, download Termius from the website for [macOS](https://termius.com/download/macos), [Windows](https://termius.com/download/windows), or [Linux](https://termius.com/download/linux).
{% endhint %}

***

## Connect to a host via SFTP

{% tabs %}
{% tab title="Desktop" %}
Opening SFTP sessions works differently on the desktop and mobile. On the desktop, a **local file system** opens by default.

To connect to a host via SFTP on the desktop:

1. Open the `SFTP` tab
2. In one of the SFTP panes, select a host

   <figure><img src="/files/PqXI6xySOZnMRpGYCf4L" alt=""><figcaption></figcaption></figure>
3. Choose a host from the list

   <figure><img src="/files/ACbgygE3n5UwEKv29NNv" alt=""><figcaption></figcaption></figure>
4. Complete authentication if prompted

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

{% endtab %}

{% tab title="Mobile" %}
Opening SFTP sessions works differently on the desktop and mobile.

To connect to a host via SFTP on mobile from the `Host screen`:

1. Select the host you want to connect to
2. Open the `Context menu`:
   * **iOS:** press and hold the host

     <div align="left"><figure><img src="/files/9AvROP4ByNNBonIqF4Zq" alt="" width="375"><figcaption></figcaption></figure></div>
   * **Android:** tap the host icon, then tap the `three-dot menu`

     <div align="left"><figure><img src="/files/r2HVzY4QJ1lUbBa75h5A" alt="" width="375"><figcaption></figcaption></figure></div>
3. Tap `Connect via SFTP`
4. Complete authentication if prompted

{% hint style="success" %}
The SFTP session opens in a new tab. Desktop supports two active SFTP panes at a time. Mobile lets you open multiple SFTP tabs.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## Browse the file system

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

### Refresh the contents of the folder

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

To refresh the folder contents, click the current folder in the path bar. This works on both the desktop and mobile.

### Show hidden files

Termius doesn't show hidden files and folders by default.

**To view hidden files:**

1. Click the `Actions` menu
2. Select `Show Hidden Files`

### Manually enter a full path

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

On the desktop, click the area next to the current path to edit it. This is useful when you already know the full path and don’t want to navigate through each folder step by step.

After entering the path, press `Enter`. If the folder exists, Termius will navigate directly to that location.

## Transfer files

{% tabs %}
{% tab title="Desktop" %}
On the desktop, you can transfer files in several ways.

#### **Via drag and drop between panes**

<figure><img src="/files/9LeYt5yJXDTs04NeImkv" alt=""><figcaption></figcaption></figure>

#### Via drag and drop from your local file system to the target pane

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

#### Via the context menu

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

1. Open the **target folder** in one of the panes
2. `Right-click` the file or folder you want to transfer
3. Select `Copy to target directory` from the context menu
   {% endtab %}

{% tab title="iOS/iPadOS" %}
On iOS and iPadOS, you can transfer files in several ways.

#### Via drag and drop between Termius windows

1. Open **SFTP** sessions to your servers in separate Termius windows

   <figure><img src="/files/Qn5KzFvUT9kQDcNNIgk1" alt=""><figcaption></figcaption></figure>
2. Drag a file from one Termius window and drop it onto another Termius window with an active SFTP session

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

#### Via drag and drop from the Files app

1. Open an SFTP session in Termius, and open the Files app next to it

   <figure><img src="/files/8HRZaVDdrtGfEP3sHjhF" alt=""><figcaption></figcaption></figure>
2. Drag a file from the Files app and drop it onto the Termius window with the active SFTP session

#### Via copy and paste to the target host

1. Connect to your server via SFTP
2. Select a file and tap `Copy`. This prepares the file for transfer to a destination that you can choose later<br>

   <figure><img src="/files/hEiZvkWofDWhV9Hixixy" alt=""><figcaption></figcaption></figure>
3. Connect via SFTP to a host where you want to transfer the file<br>

   <figure><img src="/files/mTP8nuLMHrkB6ETrPB83" alt=""><figcaption></figcaption></figure>
4. Tap on the three-dot menu and select `Paste` to start the transfer to the current folder<br>

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

#### Via the Upload button

1. Connect to your server via **SFTP**
2. Tap the `Upload` button

   <figure><img src="/files/F0WvmHzO1Xc88lgZxwJL" alt=""><figcaption></figcaption></figure>
3. Select a file or folder to upload to the selected host

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

***

#### Transfers progress sheet

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

The `Transfers` section tracks file transfer status and works differently on iOS and Android.

On iOS/iPadOS, the `Transfers` section shows:

* The files stored in the `Termius > Downloads` folder on the device
* Progress of active file transfers
* Notifications of file conflict resolution (for example, replace or keep both)
* File transfer errors

{% hint style="info" %}
When a file transfer between two remote hosts is completed, the `Transfers` section won't show the corresponding file in the list anymore.
{% endhint %}

{% hint style="danger" %}
On iOS or iPad, deleting a file from the Transfers view also removes it from device storag&#x65;**,** as the Transfers section is synced with the `Termius > Downloads` folder on the device.
{% endhint %}
{% endtab %}

{% tab title="Android" %}
On Android, you can transfer or upload files in two ways.

#### Via copy and paste to the target host

1. Connect to your server via SFTP&#x20;

   <div align="left"><figure><img src="/files/r2HVzY4QJ1lUbBa75h5A" alt="" width="375"><figcaption></figcaption></figure></div>
2. Select a file and tap `Copy`**.** This prepares the file for transfer to a destination that you can choose later<br>

   <div align="left"><figure><img src="/files/Aqgrv7ikKklyOsjeavXB" alt="" width="375"><figcaption></figcaption></figure></div>
3. Connect via SFTP to a host where you want to transfer the file<br>

   <div align="left"><figure><img src="/files/l40ekgfctnEitMPPkFiX" alt="" width="375"><figcaption></figcaption></figure></div>
4. Tap the `three-dot` button and select `Paste` to start the transfer to the current folder<br>

   <div align="left"><figure><img src="/files/4xqlhOhrwuLlStBHRWoV" alt="" width="375"><figcaption></figcaption></figure></div>

#### Via the Upload button

1. Connect to your server via SFTP&#x20;

   <div align="left"><figure><img src="/files/r2HVzY4QJ1lUbBa75h5A" alt="" width="375"><figcaption></figcaption></figure></div>
2. Tap the `Upload` button. Select whether you want to upload a file or a folder<br>

   <div align="left"><figure><img src="/files/m6EV46rvKVlLrXJHsx4H" alt="" width="375"><figcaption></figcaption></figure></div>
3. Choose a file or folder to start the upload to the selected host<br>

***

#### Transfers view

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

The `Transfers` section tracks file transfer status and works differently on iOS and Android.

On Android, the `Transfers` section shows:

* Status of completed uploads, downloads, and transfers
* Progress of active file transfers
* Notifications of file conflict resolution (for example, replace or keep both)
* File transfer errors

{% hint style="info" %}
Removing an item from the `Transfers` section only removes it from the UI.
{% endhint %}
{% endtab %}
{% endtabs %}

## Edit files

{% tabs %}
{% tab title="Desktop" %}

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

To open a file for viewing or editing, you can:

* `Double-click` the file, or
* `Right-click` the file and select `Open` or `Open with`

When you open a file from a remote host, Termius downloads the file to a temporary local folder for editing. After you finish editing, the app detects the changes and prompts you to upload the updated file back to the host.

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

#### Default apps for different file types

When you use the `Open with` option, Termius remembers the application you selected for that file type.

You can review the apps associated with different file types in `Termius > Settings > SFTP`.

<figure><img src="/files/TRsqzQNAdO7CsdTb5x55" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="iOS/iPadOS" %}
To **open** and **edit** a file on iOS or iPadOS:

1. **Download** the file. **Press** and **hold** the file, then select `Download` . Termius downloads it to the `Termius > Download` folder on the device

   <figure><img src="/files/MSKbSRvvShSiVvBQFHhe" alt=""><figcaption></figcaption></figure>
2. In the **Transfers** list, tap the file to open it in one of the apps available on your device<br>

   <figure><img src="/files/uIrH1SaywthlLFLDTcdX" alt=""><figcaption></figcaption></figure>
3. **Press** and **hold** the file, then choose an app to edit it

   <figure><img src="/files/GCIMPeUWflgwTejdQgTj" alt=""><figcaption></figcaption></figure>
4. Edit the file and **save your changes locally**
5. Return to `Termius > SFTP session` and tap `Upload`, then select the edited file to upload it back to the host

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

{% hint style="danger" %}
**The Transfers section on iOS works differently from Android**

On iOS and iPadOS, deleting a file from the Transfers view also removes it from device storage, because the Transfers section is synced with the `Termius > Downloads` folder on the device.
{% endhint %}
{% endtab %}

{% tab title="Android" %}
On Android, you can either download a file and edit it locally or edit it directly on the remote host with a terminal editor such as vi, vim, emacs, or nano, or via a custom command.

To **edit** a file via a **terminal editor**:

1. Press and hold the file you want to edit. Open the three-dot menu and select `Edit`.<br>

   <div align="left"><figure><img src="/files/mRt10uEAFTSEpJX3qBAK" alt="" width="375"><figcaption></figcaption></figure></div>
2. Choose the editor you want to use.<br>

   <div align="left"><figure><img src="/files/RHMt57nHIDm2znfQ449p" alt="" width="375"><figcaption></figcaption></figure></div>
3. If the selected editor is installed on the host, it opens in the terminal.<br>

   <div align="left"><figure><img src="/files/xZhJbDqMBTnNFRMU3FCM" alt="" width="375"><figcaption></figcaption></figure></div>
4. Make your changes and save the file.

***

To **edit** a file **locally**:

1. **Download** the file:
   1. Press and hold the file you want to edit. Open the **three-dot menu** and select `Download`

      <div align="left"><figure><img src="/files/wyMIfzKxyQETBbYTZZSd" alt="" width="375"><figcaption></figcaption></figure></div>
   2. **Choose** the folder where the file **will be saved**. Future downloads will be saved there automatically
2. In the Transfers list, tap the file to open it in one of the apps available on your device<br>

   <div align="left"><figure><img src="/files/YubU7fb8LE9dw3EJJwsm" alt="" width="375"><figcaption></figcaption></figure></div>
3. Edit the file and save your changes locally<br>

   <div align="left"><figure><img src="/files/Xwpdo5o66TwgcGp2UVuz" alt="" width="375"><figcaption></figcaption></figure></div>
4. Return to `Termius > SFTP session` and tap `Upload`, then select the edited file to upload it back to the selected host

   <div align="left"><figure><img src="/files/m6EV46rvKVlLrXJHsx4H" alt="" width="375"><figcaption></figcaption></figure></div>

{% endtab %}
{% endtabs %}


---

# 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.termius.com/organize-and-connect-to-hosts/managing-files-with-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.
