You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
beszel-agent: -k <path-to-keyfile> always fails with 'ssh: no key found' — only inline key values parse #2764
beszel-agent fails to start when the hub public key is passed as a file path to -k/--key, with a parse error that misleads you into thinking the key file is corrupt:
$ beszel-agent -k /etc/beszel/hub.pub -t <token>
Failed to load public keys:failed to parse key: /etc/beszel/hub.pub, error: ssh: no key found
beszel-agent -k /tmp/fk.pub -t x → Failed to load public keys:failed to parse key: /tmp/fk.pub, error: ssh: no key found
Same with the hub's own key file (id_ed25519.pub copied from the hub's beszel_data), with and without trailing newline — same error.
Pass the key inline: beszel-agent -k "$(cat /tmp/fk.pub)" -t x → starts fine (Data directory detected, SSH server starts).
Same behavior reproduced with the current henrygd/beszel-agent image (--key /tmp/fk.pub fails, --key "$(cat ...)" works), so this is not fixed in latest.
Expected behavior
Either:
-k <path> reads the file and parses the key, or
the error message says file-path values are not supported, pass the key inline.
Right now the message ("failed to parse key: ") points at the key material being invalid, which cost us a while diagnosing a key that was byte-identical to the hub's.
Notes
The README/systemd examples show -k <path> style usage (KEY_FILE env var is accepted too — didn't test whether that path works). If only literal key values are supported, the flag help (-k, --key string Public key(s) for SSH authentication) should say so.
Versions: agent 0.21.1 binary (pre-staged release download) and current henrygd/beszel-agent:latest image (digest sha256:cb68680…), hub 0.21.x on linux.
-k/--key and KEY take the key value itself, not a path, so the path gets parsed as a key and you see ssh: no key found. To load the key from a file, use KEY_FILE:
Activity
svenvg93 commentedon Nov 5, 2026
-k/--keyandKEYtake the key value itself, not a path, so the path gets parsed as a key and you seessh: no key found. To load the key from a file, useKEY_FILE:-kandKEYtake precedence overKEY_FILE, so remove them when you switch. I tested this on currentmain.The error message and flag help should make this clearer, I will improve the message.
fix(agent): accept key file path in -k flag (#2764, #2765)
Update henrygd/beszel-agent Docker tag to v0.21.2 (#47)
Update ghcr.io/henrygd/beszel/beszel Docker tag to v0.21.2 (#46)