Host Chaining Host Chaining

Host Chaining

Dmitry Machulo Dmitry Machulo

You may sometimes need to connect to an SSH host that cannot be reached directly from your local machine but can be reached from another SSH host to which you do have access. This problem can be solved with local port forwarding or, perhaps, more conveniently using the host chaining feature.

Host chaining lets you connect to SSH hosts that require you first to connect to another, intermediary, SSH server, such as bastion server or jump box. Host chaining is similar to the -J argument or ProxyJump option, which are available in OpenSSH.

Note: Host chaining is not available in the Hobby (free) plan.

ezgif-4-ea13f8dcac.gif

To connect through an intermediary server (or servers), in short, you'll need to:

  1. Add the target host and intermediary hosts to Termius.
  2. Specify the intermediary hosts in the properties of the target host.
  3. Connect to the target host (tap or double-click it).

When you connect through an intermediary, you connect through a tunnel between your local machine, the intermediary host, and the target host. All data sent from your local machine to the target host and back from the server is transmitted in an encrypted form.

Important: Host chaining cannot be used for connecting to servers not allowing port forwarding.

Set up a host chain

  1. Add the intermediary host(s) and the target host to Termius.
  2. Right-click the target host and click Edit.
  3. Next to the Host Chaining field, click Edit Chain.
  4. Click Add host.
  5. Select the host from where the target host is reachable.
  6. Click Done.
  7. To add a host from where the host you've just added is reachable:
    1. Click Add Host.
    2. Select the intermediary host.
    3. Click Done.
  8. Save the changes.
  9. Connect to the target host entry.
    ezgif-4-ea13f8dcac.gif
  1. Add the intermediary host(s) and the target host to Termius.
  2. Open the Hosts screen.
  3. Tap the target host and hold, then tap Edit.
  4. Tap the Host chaining field and then Add host.
  5. Select the host from where the target host is reachable.
  6. To add a host from where the host you've just added is reachable:
    1. Tap Add host.
    2. Select the intermediary host.
  7. Save the changes. Connect to the target host entry.
  8. ezgif-2-cca33680b9.gif
  1. Add the intermediary host(s) and the target host to Termius.
  2. Open the Hosts screen.
  3. Tap the target host's icon, then tap Edit.
  4. Tap the Host chaining field and then Add host.
  5. Select the host from where the target host is reachable.
  6. To add a host from where the host you've just added is reachable:
    1. Tap Add host.
    2. Select the intermediary host.
  7. Save the changes. Connect to the target host entry.
  8. 1647351731257592585728296692751.gif

Host chaining in groups

When you have several hosts behind the same bastions, it may not be convenient to manage host chains for each of those hosts. Instead, you can create a group and set up host chaining in it, and then just add the hosts to the group. Each host will inherit the host chaining setting from the group – provided, however, that a particular host entry was not using a host chain already.

ezgif-5-aaccc04d95.gif

When you have several hosts behind the same bastions, it may not be convenient to manage host chains for each of those hosts. Instead, you can create a group and set up host chaining in it, and then just add the hosts to the group. Each host will inherit the host chaining setting from the group – provided, however, that a particular host entry was not using a host chain already.

16473528285692284453501525494088.gif

Add comment

Please sign in to leave a comment.

Comments

1 comment

  • Ingo Radatz

    I had a hard time to find out that the bastion server host configuration cannot use a biometrical key. I've confirmed to myself that a JumpHost configuration works as expected in my desktop terminal. Then I've configured the same private key into Termius and it has worked from the start.

    Here is my concern: I don't want to use the private softkey in Termius. This was meant as "backup". The only keys I've use till now where Biometric keys stored in the Secure Enclave.

    Ingo Radatz
    0