mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-03 03:03:59 +01:00
fix(ssh): reuse connections only for GitHub and LAN hosts (#540)
Assisted-by: DeepSeek Harness (claude-opus-5-5)
This commit is contained in:
1 parent
fa6cded1da
commit
b49a1dc3cf
2 files changed
+14
-16
No files matched your search
@@ -198,6 +198,11 @@ satisfy sudo. Agent forwarding is on for `192.168.*` and the `hostsAddr` aliases
|
||||
([ssh.nix](../home/base/tui/ssh.nix)); without a forwarded agent, or with the key unplugged, sudo
|
||||
asks for the password.
|
||||
|
||||
Other addresses, such as a tailnet IP, forward only with `ssh -A`. Without it, the server falls back
|
||||
to its own agent, so sudo asks for the password and git fails with `agent refused operation`. The
|
||||
aliases and `192.168.*` keep a `ControlMaster`, so forwarding there follows the first connection;
|
||||
run `ssh -O exit <host>` if that master was opened without forwarding.
|
||||
|
||||
While a session is open, root on that server can also use the forwarded agent. Each signature still
|
||||
needs a touch, so an unexpected blink is the signal to refuse it.
|
||||
|
||||
|
||||
Reference in new issue
Block a user