diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-08 20:47:01 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-08 20:47:01 +0100 |
commit | d4acc4cd8083c232387c3ebb78178c5032e0b06f (patch) | |
tree | 857e35fdc3c61d46a9872208002a34c46c7cb3c9 | |
parent | Add environment variables that lets the user override the option classes of ssh (diff) | |
download | sshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.gz sshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.bz2 sshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.xz |
Add SSHEXEC_SSH
Signed-off-by: Mattias Andrée <m@maandree.se>
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | sshcd.1 | 7 | ||||
-rw-r--r-- | sshexec.1 | 7 | ||||
-rw-r--r-- | sshexec.c | 7 |
4 files changed, 23 insertions, 2 deletions
@@ -158,6 +158,10 @@ ENVIRONMENT VARIABLES variable affects where the sshexec utility can find the ssh(1) utility or ssh-command. + SSHEXEC_SSH + If set and non-empty, it overrides the default value of + ssh-command from ssh to the value of the variable. + SSHEXEC_OPTS_NO_ARG List of options that sshexec shall interpret as ssh(1) options that do not have any argument. (Default is @@ -140,6 +140,13 @@ to tell SSH to allocate a pseudo terminal. If unset will be used. If set but empty, no flag will be passed to .BR ssh (1). .TP +.I SSHEXEC_SSH +If set and non-empty, it overrides the default value of +.I ssh-command +from +.B ssh +to the value of the variable. +.TP .I SSHEXEC_OPTS_NO_ARG List of options that .B sshexec @@ -296,6 +296,13 @@ utility can find the utility or .IR ssh-command . .TP +.I SSHEXEC_SSH +If set and non-empty, it overrides the default value of +.I ssh-command +from +.B ssh +to the value of the variable. +.TP .I SSHEXEC_OPTS_NO_ARG List of options that .B sshexec @@ -480,8 +480,11 @@ parse_sshexec_options(char *argv[]) end_of_options: /* Parse options and set defaults */ - if (!ssh) - ssh = "ssh"; + if (!ssh) { + ssh = get("SSHEXEC_SSH", ""); + if (!*ssh) + ssh = "ssh"; + } if (!cd) strict_cd = !is_sshcd; |