> 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/organize-and-connect-to-hosts/connecting-to-a-server.md).

# Connecting to a server

Termius provides users with a variety of options to connect to servers. It includes a built-in Local terminal and supports SSH, Mosh, Telnet, Serial, and SFTP.

## SSH with a password

{% tabs %}
{% tab title="Desktop" %}
To connect using a password on the desktop:

1. Open the `Vault` tab, then `Hosts` screen
2. Click `New Host`

   <figure><img src="/files/ZeRNUSdma8T9sT1aFUzM" alt=""><figcaption></figcaption></figure>
3. Enter the IP address, port, username, and password. Termius auto-saves your host

   <figure><img src="/files/YBIP9gNAzVpt97LBl5UF" alt=""><figcaption></figcaption></figure>
4. Click `Connect`

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

{% endtab %}

{% tab title="Mobile" %}
To connect using a password on mobile:

1. Tap the `+` button on the Hosts screen, then tap `New Host`

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. Enter the IP address, port, username, and password

   <div align="left"><figure><img src="/files/r6w7X6tJtyC9PhJGBTlX" alt="" width="375"><figcaption></figcaption></figure></div>
3. Tap `Save`

   <div align="left"><figure><img src="/files/NAq7meKm5I1bjGLJRz0C" alt="" width="375"><figcaption></figcaption></figure></div>
4. Tap your host to `Connect`
   {% endtab %}
   {% endtabs %}

## SSH with an SSH key

{% tabs %}
{% tab title="Desktop" %}
To connect to a server using an SSH key on the desktop:

1. Open the `Vault` tab, then `Hosts` screen
2. Click `New Host`

   <figure><img src="/files/ZeRNUSdma8T9sT1aFUzM" alt=""><figcaption></figcaption></figure>
3. Enter the IP address, port, and username

   <figure><img src="/files/YBIP9gNAzVpt97LBl5UF" alt=""><figcaption></figcaption></figure>
4. Click `+ SSH ID, Key, Certificate, FIDO2` section and choose `Key`

   <figure><img src="/files/tttWlzFeRVN3bYwl4zGq" alt=""><figcaption></figcaption></figure>
5. Enter the key name/label

   <figure><img src="/files/HISkGHNDtm4crdlCPT62" alt=""><figcaption></figcaption></figure>
6. Import or paste your private key, then click `Save`. Termius auto-saves your host

   <figure><img src="/files/SI6Kf2MXORmOgc7HtJJB" alt=""><figcaption></figcaption></figure>
7. Click `Connect`

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

{% endtab %}

{% tab title="Mobile" %}
To connect to a server using an SSH key on mobile:

1. Tap the `+` button on the hosts screen and then tap `New Host`

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. Enter the IP address, port, and username

   <div align="left"><figure><img src="/files/r6w7X6tJtyC9PhJGBTlX" alt="" width="375"><figcaption></figcaption></figure></div>
3. Tap `SSH ID, Key, Certificate, FIDO2` in credential section

   <div align="left"><figure><img src="/files/FfOakJbd353JDaHCj5ds" alt="" width="375"><figcaption></figcaption></figure></div>
4. Choose a key

   <div align="left"><figure><img src="/files/Ud4CkYmSAPrl8jmFIYJT" alt="" width="375"><figcaption></figcaption></figure></div>
5. Tap `Save`

   <div align="left"><figure><img src="/files/NAq7meKm5I1bjGLJRz0C" alt="" width="375"><figcaption></figcaption></figure></div>
6. Tap your host to `Connect`
   {% endtab %}
   {% endtabs %}

{% hint style="info" %}
See [Keychain](/keychain/ssh-keys-and-certificates.md) to explore all Termius Keychain capabilities.
{% endhint %}

### SSH agent forwarding

**SSH Agent Forwarding** allows you to securely use your local SSH keys on remote servers or intermediate jump hosts without needing to store your private keys on those remote machines.

This allows you to use the `ssh -A` command and the host's private key, or any other key in the agent, for authenticating on a more distant server.

{% hint style="info" %}
Termius uses its own built-in SSH agent (not the OS agent). It keeps the connection experience consistent across all platforms where Termius is supported.
{% endhint %}

{% tabs %}
{% tab title="Desktop" %}
To enable SSH agent forwarding on the desktop:

1. Open the Host details, scroll to the Credential section and click `Show more`

   <figure><img src="/files/9MuQqeDdLm1DhvodMGKw" alt=""><figcaption></figcaption></figure>
2. Click `Agent Forwarding`, then select `Enabled`&#x20;

   <figure><img src="/files/8G1XZF1OSrsQLF8DILkC" alt=""><figcaption></figcaption></figure>
3. Once connected, the key used for authentication is added to the SSH agent in Termius
   {% endtab %}

{% tab title="Mobile" %}
To enable SSH agent forwarding on mobile:

1. Open the Host details, scroll to the Credential section and turn on `SSH Agent Forwarding`

   <div align="left"><figure><img src="/files/w8tgTAhVKsXlqNdF8zPP" alt="" width="375"><figcaption></figcaption></figure></div>
2. Once connected, the key used for authentication is added to the SSH agent in Termius
   {% endtab %}
   {% endtabs %}

## Connect through jump hosts

Jump hosts provide secure access to a target machine that is not directly reachable. Termius makes it easy to configure multiple jump hosts in a sequence called a **host chain**. This lets you connect to the target machine in one click, automatically hopping through the chain of your hosts. To set up a host chain, follow the steps below.

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

1. [Create a host](#ssh-with-a-password) or edit an existing one. This host is a target host
2. In the Host details screen, scroll down and click `Show more`

   <figure><img src="/files/9MuQqeDdLm1DhvodMGKw" alt=""><figcaption></figcaption></figure>
3. Click `Host Chaining` field

   <figure><img src="/files/Bk1VQ89IH7wr9lGNzpRD" alt=""><figcaption></figcaption></figure>
4. Select an `intermediate host` from the list or create a new one. You can select multiple intermediate hosts, reflecting your network configuration and use case

   <figure><img src="/files/Mq06wPfahtb9YMqQdjIh" alt=""><figcaption></figcaption></figure>
5. Click `Save`. Then Termius auto-saves your host configuration

   <figure><img src="/files/YHNULSxw4KT6dy1zKy2a" alt=""><figcaption></figcaption></figure>
6. Click `Connect`. Termius sets up SSH tunnels to the target host through all the chained hosts

   <figure><img src="/files/4J2OjtlWOk5XViFaiVYS" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Mobile" %}

1. Create a host or edit an existing one. This host is a target host

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. In the `Edit Host` screen, scroll down and tap `Host Chaining`

   <div align="left"><figure><img src="/files/YfIrDrEQPQMbSOU1wdk8" alt="" width="375"><figcaption></figcaption></figure></div>
3. Select a `bastion host` from the list (if you already created one) or create a new one. You can select multiple intermediate hosts, reflecting your network configuration and use case

   <div align="left"><figure><img src="/files/qXsenMwRSoNMlvhgzCxi" alt="" width="375"><figcaption></figcaption></figure></div>
4. Tap `Save`

   <div align="left"><figure><img src="/files/3cNTfU3BphaTKMRWVVpl" alt="" width="375"><figcaption></figcaption></figure></div>
5. Tap your `Target host` to connect. Termius sets up SSH tunnels to a `Target host` through all the chain hosts.
   {% endtab %}
   {% endtabs %}

{% hint style="info" %}
**Pro tip:** If you need the same host chain for multiple hosts, configure it on a group instead of setting it on each host.

Every host placed in this group inherits the host chaining settings from that group.
{% endhint %}

## Connect through a proxy

Termius supports SSH connections through HTTP or SOCKS5 proxies.

{% tabs %}
{% tab title="Desktop" %}
To connect through a proxy on the desktop:

1. Open the `Vault` tab, then `Hosts` screen
2. Click `New Host` or edit an existing one
3. In the Host details screen, scroll down, and click `Show more` if you don't see the extra options

   <figure><img src="/files/9MuQqeDdLm1DhvodMGKw" alt=""><figcaption></figcaption></figure>
4. Click the `Proxy` field

   <figure><img src="/files/qJQqlXBiV5CwmcjKe7yS" alt=""><figcaption></figcaption></figure>
5. In the `Type` drop-down, select the proxy server protocol: SOCKS5 or HTTP

   <figure><img src="/files/eQDzggOcueqURdaXxjFB" alt=""><figcaption></figcaption></figure>
6. Enter the hostname or address, port, and credentials of your proxy server

   <figure><img src="/files/g1Aoe48d9zKlHxDpOidR" alt=""><figcaption></figcaption></figure>
7. Click `Save`. Then Termius auto-saves your host configuration

   <figure><img src="/files/dgeXp6WnuWVfAGWY22Qr" alt=""><figcaption></figcaption></figure>
8. Click `Connect`
   {% endtab %}

{% tab title="Mobile" %}
To connect through a proxy on mobile:

1. Create a host or edit an existing one

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. In the `Edit host` screen, scroll down, and tap `Proxy`

   <div align="left"><figure><img src="/files/CyYSdywk1d0QbvU3m9lE" alt="" width="375"><figcaption></figcaption></figure></div>
3. Choose the type of proxy server protocol: HTTP or SOCKS5

   <div align="left"><figure><img src="/files/H3t3SpYEvAmjyWtaFInt" alt="" width="375"><figcaption></figcaption></figure></div>
4. Enter the hostname or address, port, and credentials of your proxy server

   <div align="left"><figure><img src="/files/vm6dVwllP74hmg0UpLqg" alt="" width="375"><figcaption></figcaption></figure></div>
5. Tap `Save`
6. Then `Save` the host to apply the changes
7. Tap your host to `Connect`
   {% endtab %}
   {% endtabs %}

## Mosh (Mobile Shell)

[Mosh](https://mosh.org/) is a companion protocol to SSH that maintains sessions when TCP connections are interrupted. It employs a parallel UDP session to keep the session alive. That also enables Mosh to maintain its own terminal buffer that intelligently echoes your input, even if the server is slow or the network lags.

The enhancements provided by Mosh are really important for reliable mobile connectivity. If your device changes networks or loses connection, Mosh can keep your session alive until the connection is re-established.

The Mosh service is distinct from SSH and must be installed and configured separately on your host system. Once the service is up and running, you can use it on your hosts in Termius.

{% hint style="info" %}
Termius uses its own library for Mosh compatibility. Mosh 1.3.0 and newer versions are supported.
{% endhint %}

{% tabs %}
{% tab title="Desktop" %}
To connect via Mosh on the desktop:

1. Open the `Vault` tab, then the `Hosts` screen
2. Click `New Host` or edit an existing one
3. In the `Host Details` screen, scroll down, and click `Show more` if you don't see the extra options

   <figure><img src="/files/9MuQqeDdLm1DhvodMGKw" alt=""><figcaption></figcaption></figure>
4. Enable `Mosh`

   <figure><img src="/files/icVCyhXGAthZEBf7fJhL" alt=""><figcaption></figcaption></figure>
5. If your Mosh server is running on non-default ports, specify it accordingly:
   1. Default command for starting the mosh session: `mosh-server new -s -l LANG=en_US.UTF-8`
   2. In case you need to specify the custom port range: `mosh-server new -s -l LANG=en_US.UTF-8 -p [port from]:[port to]`
6. Termius auto-saves your host
7. Click `Connect`
   {% endtab %}

{% tab title="Mobile" %}
To connect via Mosh on mobile:

1. Create a host or edit an existing one

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. Enable the `Use Mosh` setting

   <div align="left"><figure><img src="/files/mero1VThg6Ie5F05aQ56" alt="" width="375"><figcaption></figcaption></figure></div>
3. If your Mosh server is running on non-default ports, specify it accordingly:
   1. Default command for starting the mosh session: `mosh-server new -s -l LANG=en_US.UTF-8`
   2. In case you need to specify the custom port range: `mosh-server new -s -l LANG=en_US.UTF-8 -p [port from]:[port to]`
4. Tap `Save`
5. Tap your host to `Connect`
   {% endtab %}
   {% endtabs %}

## Telnet

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

1. Open the `Vault` tab, then the `Hosts` screen
2. Click `New Host` or edit an existing one
3. In the Host details screen, scroll down and click `+ Add Telnet`

   <figure><img src="/files/gEcJYs3Cd40UgVjONn1h" alt=""><figcaption></figcaption></figure>
4. Enter the port, username, and password. Termius auto-saves your host

   <figure><img src="/files/GMYYJRx8JxHj5sWbFqqr" alt=""><figcaption></figcaption></figure>
5. Click `Connect`
   {% endtab %}

{% tab title="Mobile" %}

1. Create a host or edit an existing one

   <div align="left"><figure><img src="/files/EEN54VA1KTPl0cGpLiTo" alt="" width="375"><figcaption></figcaption></figure></div>
2. In the `Edit Host` screen, scroll down, and toggle `Telnet`

   <div align="left"><figure><img src="/files/E34rdk45fV7Ew4nWJc6X" alt="" width="375"><figcaption></figcaption></figure></div>
3. Enter the port, username, and password

   <div align="left"><figure><img src="/files/hEJBh6FOGcwbieWTWRJM" alt="" width="375"><figcaption></figcaption></figure></div>
4. Tap `Save`
5. Tap your host to `Connect`
   {% endtab %}
   {% endtabs %}

{% hint style="warning" %}
Telnet transmits data in plaintext, so avoid using it for sensitive information.
{% endhint %}

## Serial

Termius lets you connect to switches and routers over a serial port using a single cable: [Redpark's USB-C Serial Cable (C4-RJ45V)](https://redpark.com/usb-c-console-cable/) or [Redpark's Lightning Console Cable (L2RJ45V3)](https://redpark.com/lightning-console-cable-l2-rj45v/).

{% hint style="info" %}
Please note that serial connections may not work over USB hubs. Ensure to connect directly.&#x20;
{% endhint %}

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

1. Open the `Vault` tab, then the `Hosts` screen
2. Click the `Serial` button, or use the hotkey `Cmd+Option+S/CTRL+Alt+S`

   <figure><img src="/files/7CXp4Ruz2JYIGkFvd8N3" alt=""><figcaption></figcaption></figure>
3. Choose the serial port you want to connect to

   <figure><img src="/files/piLqgf48XY5GDMRah5Y6" alt=""><figcaption></figcaption></figure>
4. In the Advanced section set the required configuration: baud rate, data bits, stop bits, flow control, and parity

   <figure><img src="/files/B6Uaw7ma31iyjiKXSgjf" alt=""><figcaption></figcaption></figure>
5. Click `Connect`

{% hint style="warning" %}
If you experience issues with serial connections in Termius downloaded from the Microsoft Windows Store, install Termius from our website instead - [Download Windows](https://termius.com/download/windows)
{% endhint %}
{% endtab %}

{% tab title="Mobile" %}

1. Open the `Connections` tab

   <div align="left"><figure><img src="/files/tE81DzPJD2O8s86Nn8YK" alt="" width="375"><figcaption></figcaption></figure></div>
2. Search in the `Search` field or just scroll down to the bottom, and select `Start a serial connection`&#x20;

   <div align="left"><figure><img src="/files/cn8NMM7jCWvsRo1wBuwv" alt="" width="375"><figcaption></figcaption></figure></div>
3. Enter the required configuration: baud rate, flow control, data bits, stop bits, and parity

   <div align="left"><figure><img src="/files/KiyUSw80uKXUJnqEdmau" alt="" width="375"><figcaption></figcaption></figure></div>
4. Tap `Connect`
   {% endtab %}
   {% endtabs %}

## Local Terminal

To open a local terminal:

1. Open the `Vault` tab, then the `Hosts` screen
2. Click the `Terminal` button or use the hotkey `CTRL/Cmd+L`

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

By default, the local terminal uses a shell specified in the system's settings. You can choose a different shell in settings:

1. Open `Termius > Settings > Terminal`
2. Scroll down to the `Local Terminal Path` section. Choose the preferred shell:

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

{% hint style="warning" %}
Termius from the Mac App Store and Snap Store do not include the Local Terminal feature due to sandbox limitations. 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) to use Local Terminal.
{% endhint %}


---

# 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/organize-and-connect-to-hosts/connecting-to-a-server.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.
