> For the complete documentation index, see [llms.txt](https://docs.termius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.termius.com/help-center/troubleshooting/i-cant-connect-to-a-host.md).

# I can't connect to a host

## Host is unreachable

### Double-check the IP address and port

Sometimes the issue is just a typo in the host address or a missing custom SSH port. Open the host details and make sure the address and port are correct.

### Check the Local Network permissions on iOS and macOS

If you cannot connect to a host on your local network from iOS, iPadOS, or macOS, make sure Termius has the `Local Network` permission:

1. Open the system **Settings**.
2. Find **Termius** in the list of apps.
3. Make sure **Local Network** is enabled for Termius.

If this permission is disabled, Termius cannot connect to devices on your local network.

For more details about the `Local Network` permission, see [Apple's documentation](https://support.apple.com/en-us/HT211870).

### Try switching to the Experimental Connection Process on iOS

If `Local Network` is already enabled and the issue persists:

1. Open **Termius** → **Profile** → **Settings**.
2. In the **Sessions** section, enable **Experimental Connection Process**.

This uses a different hostname resolution process, which may resolve the issue.

## Can't establish SSH connection

SSH connections can fail at several stages during the connection process.

### Issues with Key Exchange

In some cases, the connection drops right after the `Starting SSH session` step. In others, it gets a bit further but fails during key exchange and never reaches authentication.

**Why this might happen?**

Termius supports [post-quantum cryptography](/security/post-quantum-cryptography.md).

This increases the amount of data sent during the initial handshake. Depending on the network, it may slightly increase connection setup time.

{% hint style="warning" %}
On some older systems, the larger initial handshake can fail and cause a premature disconnection.
{% endhint %}

**How to fix it?**

Try disabling post-quantum key exchange during connection.

1. Open **Termius** → **Settings**.
2. In the **Terminal** section, disable **Post-Quantum Key Exchange**.

### Authentication by public key fails

If you are sure the correct key is configured, the public key is present in the server's `authorized_keys` file, and authentication still fails with `Private key is empty` or a similar error, check how the key is configured in Termius.

**Make sure you imported the key into Termius and linked it to the correct host** — [SSH with an SSH key](/organize-and-connect-to-hosts/connecting-to-a-server.md#ssh-with-an-ssh-key).

It is easy to assume you can enter a local file path to the private key, or leave the key unlinked and let the app try all available keys automatically. Termius does not work that way.

Termius provides a consistent experience across desktop and mobile, especially when sync is enabled. That requires connection data to be stored in your Termius vault. For public key authentication to work, the key must be imported into the app and linked with the corresponding hosts.

## Connection drops immediately after a successful authentication

In some cases, the session may disconnect immediately after authentication or a few seconds later.

One possible cause is how the SSH server handles how Termius performs the host's OS detection or shell history fetching for terminal autocomplete.

Some Termius features use SSH `exec` channels to run commands right after the connection is established. You can confirm this by looking for the `⚙️ Executing command` entry near the end of the connection log.&#x20;

It's a common problem when you use Termius to connect to routers and switches, affecting Cisco, Ruckus, SonicWall, and other devices.&#x20;

Not all devices support SSH exec channels. In other cases, the ssh server may be setup in a way allowing only one channel to be opened per session.&#x20;

If this issue looks similar to yours, disable the features that rely on SSH `exec` channels.

{% tabs %}
{% tab title="Desktop" %}
Open **Termius** → **Settings** → **Terminal** and disable:

* Autocomplete
* Import shell history
* Detect OS
  {% endtab %}

{% tab title="Mobile" %}
Open **Termius** → **Profile** → **Settings** and disable:

* Import command history
* Detect Host Operating System
  {% endtab %}
  {% endtabs %}

## Invalid user on Palo Alto Networks devices

There are cases when, after a successful authentication on Palo Alto devices, you immediately see an error in the terminal: `Invalid user. Please login using a valid account`.&#x20;

The reason you see it is similar to the one described above in [Connection drops after a successful authentication](/help-center/troubleshooting/connection-drops-after-a-successful-authentication.md), and the solution is the same: disable the features that rely on `exec` channels (Autocomplete, Import shell history, and Detect OS).&#x20;

## I can't connect using SFTP, but SSH connections work

{% hint style="info" %}
Sometimes **SFTP** is confused with **FTP** or **SCP**. They are different protocols, even if some apps present them in a similar way.
{% endhint %}

The main troubleshooting step is to make sure SFTP is enabled in the `sshd_config` file on your server.


---

# 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://docs.termius.com/help-center/troubleshooting/i-cant-connect-to-a-host.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.
