Watch
0
0
Fork
You've already forked hyperhive
0

egress: document the allowed ssh connections

This commit is contained in:
atlas 2026-11-20 03:25:50 +01:00
commit eab2dcb0a2

View file

@ -60,9 +60,11 @@ whole file, at that path. To work inside the agent's container instead, see
key changed and you didn't change the machine, don't clear it: something else
answers at that address.
This doesn't open the network. If you set the hive's `egress.forward` to
`reject`, the hive refuses the agent's direct connection to the machine's port
until a separate allowance exists; the default `log` lets it through. See
The SSH switch and the CA don't open the network. The default `egress.forward`
of `log` lets the agent's direct connection to the machine's port through. If
you set it to `reject`, the hive refuses the connection unless you gave the
agent a named connection to that host and port (see
[Named connections](#named-connections)). See
[the network page](../../4-implementation/networking/network.md).
## 2. Make a machine trust the CA
@ -111,8 +113,16 @@ 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
switch is off, so one switch ends both the certificate and the names.
A named connection also lets the agent through the hive's egress rule. Under
`egress.forward = "reject"` the hive accepts TCP from that agent to the host
and port of each of its names, and from no other agent. The hive looks the
host up itself, every ten minutes, and accepts every IPv4 address it answers
with, except one inside its own agent bridge subnet. A name must therefore
resolve on the hive host the way it does for you. If the lookup fails or
hangs, the hive keeps the last answer. A new name, a removed one or a
flipped switch reaches the hive's rule in about a minute. The routes and the
rules a connection must meet are on
[the SSH CA implementation page](../../4-implementation/swarm/ssh-ca.md#named-connections).