make defaults configurable

This commit is contained in:
fatalerrors
2026-04-15 13:38:08 +02:00
parent 85f02f4498
commit 9a006883b8
11 changed files with 269 additions and 40 deletions

View File

@@ -186,10 +186,20 @@ ssr()
local srv=$1
shift
ssh -Y root@"$srv" "$@"
# Build default options array from config, falling back to -Y (X11 forwarding)
local -a ssh_default_opts=()
if [[ -n "${SSH_DEFAULT_OPT:-}" ]]; then
read -ra ssh_default_opts <<< "${SSH_DEFAULT_OPT}"
else
ssh_default_opts=(-Y)
fi
ssh "${ssh_default_opts[@]}" root@"$srv" "$@"
}
export -f ssr
# ------------------------------------------------------------------------------
load_conf "ssh"
# EOF