make defaults configurable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user