aboutsummaryrefslogtreecommitdiffstats
path: root/sshexec.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-02-08 20:47:01 +0100
committerMattias Andrée <m@maandree.se>2025-02-08 20:47:01 +0100
commitd4acc4cd8083c232387c3ebb78178c5032e0b06f (patch)
tree857e35fdc3c61d46a9872208002a34c46c7cb3c9 /sshexec.c
parentAdd environment variables that lets the user override the option classes of ssh (diff)
downloadsshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.gz
sshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.bz2
sshexec-d4acc4cd8083c232387c3ebb78178c5032e0b06f.tar.xz
Add SSHEXEC_SSH
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--sshexec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sshexec.c b/sshexec.c
index 7ed551a..bc02987 100644
--- a/sshexec.c
+++ b/sshexec.c
@@ -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;