Skip to content

fix(ssh): pin the agent socket in Host * - #180

Merged
gapul merged 1 commit into
mainfrom
fix/ssh-identityagent-default
Aug 9, 2026
Merged

fix(ssh): pin the agent socket in Host *#180
gapul merged 1 commit into
mainfrom
fix/ssh-identityagent-default

Conversation

@gapul

@gapul gapul commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Auto-provisioning from #179 fired correctly on the first ssh to rpi4 and then failed to create the session:

pi@100.69.79.75: Permission denied (publickey).

Same root cause as #177, one level up. No private key is on disk; they all live in the Bitwarden agent. mutagen sync create hands the connection to the mutagen daemon, which has its own environment and no SSH_AUTH_SOCK, so it sees no keys. It worked for macmini and mvrx only because those two entries happen to pin IdentityAgent themselves.

Putting it in Host * fixes the class rather than the instance, and matches what is actually true on this machine. Per-host entries that set their own IdentityAgent still win.

Verified with the variable removed from the environment entirely:

$ env -u SSH_AUTH_SOCK ssh -F <new config> -o BatchMode=yes rpi4 'echo RPI_OK'
RPI_OK

Every private key is in the Bitwarden agent, and the contexts that most need it — launchd
agents, the mutagen daemon — are the ones never handed SSH_AUTH_SOCK.
@gapul
gapul enabled auto-merge (squash) August 9, 2026 10:00
@gapul
gapul merged commit 37a474b into main Aug 9, 2026
3 checks passed
@gapul
gapul deleted the fix/ssh-identityagent-default branch August 9, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant