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 a premium feature.

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 or jump boxes, it might not be very 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 specified in 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 or jump boxes, it might not be very 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 specified in 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.