From 3ffbd545fef0e5b44a271b098723366d16ab0849 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sun, 8 Dec 2024 12:07:57 -0800 Subject: [PATCH] fixed ssh func bug where remote command was before host this fixed issue with remote script module --- modules/remote.mod | 2 +- modules/ssh-pubkey.mod | 1 - modules/ssh.func | 31 ++++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/remote.mod b/modules/remote.mod index 9cb2c25..80ed40e 100644 --- a/modules/remote.mod +++ b/modules/remote.mod @@ -177,7 +177,7 @@ EOF # sshcp -y -d $host $bscript $rscript -- "${sshargs[@]}" # return if sshcp -d $host $bscript $rscript -- "${sshargs[@]}"; then - # make remote script excuteable + # echo make remote script excuteable ssh "${sshargs[@]}" "$host" "chmod +x $rscript" ssh "${sshargs[@]}" "$host" "$usesudo" "$env_vars" "$shell" $login "$rscript" "$(escape_args "$@")" # now delete it, save script if passed an explicit name diff --git a/modules/ssh-pubkey.mod b/modules/ssh-pubkey.mod index c01ffae..8d9f14f 100644 --- a/modules/ssh-pubkey.mod +++ b/modules/ssh-pubkey.mod @@ -81,7 +81,6 @@ sshpubkey () { usage: sshpubkey host -a, put the key at another user on remote. if you want to put it to root use 'root' will require remote sudo -u, remote user if not available in host --s, sudo password for remote if needed -k, can be either the path to a public key file or the name of the key currently loaded in an ssh agent -l, list the keys for the remote user -r, remove the key from the user, use the comment identifier of the public key diff --git a/modules/ssh.func b/modules/ssh.func index cb03d9f..217127c 100644 --- a/modules/ssh.func +++ b/modules/ssh.func @@ -30,9 +30,9 @@ ssh() { cat < host -put any additional SSH (man ssh) options after the host, aborting -hH:tu:dF:p:ro:k: +ssh