Let mosh reuse SSH session
Nix Flake Check / check (push) Successful in 1m2s

We don't have bastion setup for mosh hosts, so figuring out IP from
$SSH_CONNECTION is valid.
This commit is contained in:
2026-08-09 08:01:51 +02:00
parent 033811d35b
commit f1a178b329
+2 -2
View File
@@ -186,8 +186,8 @@ osh() {
) & ) &
local loop_pid=$! local loop_pid=$!
# Disable agent forwarding on the bootstrap connection to prevent it from overwriting the symlink in .ssh/rc # Allow mosh reuse of our master session.
mosh --ssh="ssh -a" "$@" mosh --experimental-remote-ip=remote "$@"
kill $loop_pid 2>/dev/null kill $loop_pid 2>/dev/null
} }