Skip to main content

Add an SSH connection

Adding a connection is three things: pin the host, seal the key, and declare the capabilities. The console does all of it in one form; the permaura CLI does it in one command; the REST API in a few calls.

1. Pin the host's fingerprint

The connection refuses to connect unless the server presents this exact key, so grab it first:

FP=$(ssh-keyscan -t ed25519 db1.example.com | ssh-keygen -lf - | awk '{print $2}')
echo "$FP" # SHA256:9Ije0/h/UFCjrsPr+a6o/dPtQhd0p9AbIQOW10Q7wJo

2. Create the connection

Open Access → Connections → Add connection and choose SSH server. The form walks the same three steps:

  • Name, Host, Port, Username — the SSH target, pinned server-side.
  • Host key fingerprint — paste the SHA256:… value from step 1. ("Skip host key verification" exists for a local dev box; don't use it across an untrusted network.)
  • Authenticate with — a private key (paste it or upload the file) or a password. Either is sealed on the gateway and never shown again.
  • Allowed commands — one row per exec capability: an action name (restart-app) and its command template (systemctl restart {service}). A {name} placeholder becomes the only thing an agent may fill in.
  • File access root — optional; exposes path-scoped sftp.get / sftp.put / sftp.list under that directory.

Save, and the connection appears on the Connections page with its capabilities listed — nothing is usable until a grant allows it.

What you get

The connection now exposes these capabilities (namespaced under its id):

CapabilityWhat it does
db1.uptimeruns uptime on the host
db1.restartruns systemctl restart <service> (approval-gated)
db1.sftp.listlists a directory under /var/data
db1.sftp.getreads a file under /var/data
db1.sftp.putwrites a file under /var/data (higher-risk)

Use it from an agent

Point an MCP client (Claude, ChatGPT, Cursor) at your gateway and the capabilities appear as tools named db1.uptime, db1.sftp.get, and so on. The agent calls them like any other tool:

  • db1.uptime with {} returns the real uptime line from the host.
  • db1.sftp.get with { "path": "reports/q3.csv" } returns the file's bytes (base64), scoped under the root.
  • db1.restart with { "service": "nginx" } returns awaiting approval and prompts you on your device; it runs only once you approve.

The key never leaves the gateway, and every call lands in the signed audit log.

Notes

  • The key you seal must be unencrypted (this build authenticates with no passphrase). Generate a dedicated one with ssh-keygen -t ed25519 -f ~/.ssh/db1_ed25519 -N '' and authorise it on the host.
  • Password auth is supported with --password-env VAR (the value is read from that environment variable and sealed, never placed on a command line).
  • Check what is configured any time with permaura connection list.