Watch
0
0
Fork
You've already forked hyperhive
0

agent ssh connections: declare per agent, render into the agent's ssh config

This commit is contained in:
atlas 2026-11-20 01:38:49 +01:00
commit 934da6f31f

View file

@ -102,6 +102,20 @@ bao read -field=public_key ssh-agents/config/ca
- It signs ed25519 user keys only, and the certificate allows a terminal
(`permit-pty`) and nothing else.
## Named connections
Give a machine a short name, so the agent runs `ssh k8s-lab-vm` instead of
`ssh -p 2222 root@muede-pc2`. You declare, per agent, a name, the user, the
host and the port. For example `k8s-lab-vm`, `root`, `muede-pc2`, `2222`.
The agent's ssh config then holds a `Host k8s-lab-vm` block with that host,
user and port, and the connection uses the same certificate as any other. The
block follows a change within ten seconds, and it's empty while the agent's SSH
switch is off, so one switch ends both the certificate and the names. A name
doesn't open the network: see the note under section 1. The routes and the
rules a connection must meet are on
[the SSH CA implementation page](../../4-implementation/swarm/ssh-ca.md#named-connections).
## Revoking access
- **One agent from one machine:** remove its principal (the `authorizedPrincipals`