Skip to content

SSH

SSH (Secure Shell) is the standard way to get a command-line session on a Linux or Unix server. With the Bridge, users reach those servers through a brokered SSH session that is policy-controlled and fully recorded - they never need the server’s real credentials.

You can offer SSH two ways, and you can use either or both:

  • Native mode - users connect with the regular ssh command (or PuTTY, MobaXterm, an IDE’s remote terminal, etc.) pointed at a port on the Bridge.
  • Browser mode - users open a terminal right inside the Bridge web interface. Nothing to install.

Granting access. Settings here enable SSH for the deployment. To grant a person access to a host, create a checkout - see the SSH credentials, command filtering, and a worked example.

Native mode

Turn on native mode and pick a port for the Bridge to listen on. Port 22 is the conventional SSH port.

bridge.yaml
ssh:
  native:
    enabled: true
    listen: "22"

A user then connects the way they always have, but to the Bridge’s address:

ssh 'alice%server.internal'@bridge.example.com

For native SSH, Bridge routes the session from the SSH username. Use <bridge-user>%<target-host> so Bridge can match the checkout and connect to the approved target.

Host keys

Every SSH server presents a host key - a fingerprint that lets a client confirm it is talking to the same server as last time, not an impostor. The Bridge needs its own host key for native SSH.

By default the Bridge generates and stores one automatically. If you run several Bridge replicas behind a load balancer, each would otherwise generate a different key, and users would see scary “host key changed” warnings depending on which replica they hit. To avoid that, give all replicas the same host key seed so they derive the same, stable fingerprint.

bridge.yaml
ssh:
  native:
    enabled: true
    listen: "22"
    host_key_path: "/data/keys/host_key"
    host_key_auto_generate: true
    host_key_seed: "a-long-shared-secret-string"

The host key seed can also be supplied with the BRIDGE_HOST_KEY_SEED environment variable, which is usually the cleaner choice for a clustered deployment. Use the same value on every replica.

Login attempts and banner

You can limit how many times a user may try to authenticate before the connection is dropped, set the SSH version string the Bridge advertises, and show a banner (a message displayed before login).

bridge.yaml
ssh:
  native:
    enabled: true
    listen: "22"
    max_auth_tries: 3
    server_version: "SSH-2.0-BritiveBridge"
    banner: "Authorized use only. All sessions are recorded."

Browser mode

Browser mode gives users an SSH terminal inside the web interface. You can tune how that terminal looks and how much scrollback history it keeps.

bridge.yaml
ssh:
  browser:
    enabled: true
    font_name: "monospace"
    font_size: 14
    color_scheme: "gray-black"
    scrollback: 5000

scrollback is the number of past lines a user can scroll back through in the terminal.

Shared options

These apply to both modes.

bridge.yaml
ssh:
  idle_timeout: 30m
  allow_insecure_host_key: true

allow_insecure_host_key controls whether the Bridge verifies the target server’s host key when it connects out to it. Left at the default (true) the Bridge does not verify it - convenient when target host keys change often, but it means the Bridge will connect even if a target’s identity cannot be confirmed. Set it to false for stricter verification.

Examples

Users connect with their own ssh client; no browser terminal.

bridge.yaml
ssh:
  idle_timeout: 30m
  native:
    enabled: true
    listen: "22"
    max_auth_tries: 3

Option reference

OptionTypeDefaultDescription
ssh.idle_timeoutduration30mClose a session after this much inactivity.
ssh.allow_insecure_host_keybooltrueSkip verification of the target server’s host key.
ssh.native.enabledboolfalseTurn on native SSH (a listening port).
ssh.native.listenstring (port)22Port the Bridge listens on. Required when native is enabled.
ssh.native.host_key_pathstring/data/keys/host_keyWhere the Bridge’s host key is stored.
ssh.native.host_key_auto_generatebooltrueGenerate a host key automatically if none exists.
ssh.native.host_key_seedstring""Seed for a deterministic, stable host key across replicas. Env: BRIDGE_HOST_KEY_SEED.
ssh.native.max_auth_triesint3Maximum authentication attempts before disconnect.
ssh.native.server_versionstringSSH-2.0-BritiveBridgeSSH version string the Bridge advertises.
ssh.native.bannerstring""Message shown before login.
ssh.browser.enabledboolfalseTurn on the in-browser SSH terminal.
ssh.browser.font_namestringmonospaceTerminal font.
ssh.browser.font_sizeint14Terminal font size.
ssh.browser.color_schemestringgray-blackTerminal color scheme.
ssh.browser.scrollbackint5000Lines of scrollback history.
Last updated on