Turn IdentitiesOnly off for ssh to (closes #74)
check / check (push) Canceled after 0s

ssh to now gives ssh -o IdentitiesOnly=no before the host, next to
-o IdentityAgent. With IdentitiesOnly yes in the user's ssh
configuration, ssh listed the agent's key but never offered it, and
the login failed with Permission denied. An option on the command
line wins over the configuration, and the tool's agent holds only the
derived key, so turning the option off adds no other key. A test
against the stand-in ssh requires the option before the host, and the
README's ssh to section names both options.

Model: opus-5-5
This commit is contained in:
2026-10-14 18:35:24 +00:00
parent efca0ebb39
commit 8fe4a3c348
3 changed files with 35 additions and 6 deletions
+5
View File
@@ -57,8 +57,13 @@ func to() *cobra.Command {
defer served.Stop()
// IdentitiesOnly yes in the user's ssh configuration
// would keep the agent's key from being offered. The
// agent holds only the derived key, so turning it off
// adds no other key.
argv := slices.Concat([]string{
"-o", "IdentityAgent=" + served.Socket(),
"-o", "IdentitiesOnly=no",
}, args)
return connect(ctx, argv)