---
title: Set up an SSH gateway
description: Reach inventory hosts that workers cannot access directly.
---

Put the gateway on a Linux host that can reach the target SSH hosts. Allow inbound TCP 2222 from the Glodrik host only. On the gateway host, install Podman, create the dedicated `glodrik` account, and enable its lingering user services.

## Start the gateway

As the gateway's `glodrik` user, create the destination directories:

```sh
mkdir -p ~/.config/glodrik-gateway ~/.config/containers/systemd
```

Copy `~/.config/glodrik/ca/user_ca.pub` from the Glodrik host to `~/.config/glodrik-gateway/user_ca.pub` on the gateway. Keep the CA private key on the Glodrik host. Copy the [gateway Quadlet file](https://github.com/glodrik-forge/glodrik/blob/main/install/podman/gateway/glodrik-gateway.container) to `~/.config/containers/systemd/`.

```sh
export XDG_RUNTIME_DIR=/run/user/$(id -u)
systemctl --user daemon-reload
systemctl --user start glodrik-gateway
```

## Register and test it

1. In **Topology → Gateways**, add the gateway's reachable address and port `2222`.
2. Assign it in the inventory where the target host's connection is configured.
3. Launch a test limited to one host and inspect its output.

If a task reports an unreachable host, check the worker-to-gateway connection first, then the gateway-to-target route and the target's machine credential. For long-running jobs, check gateway certificate validity in **Settings** if a reconnect fails late in the run.
