diff options
author | James Pannacciulli <jpnc@jpnc.info> | 2015-04-12 21:59:34 -0700 |
---|---|---|
committer | James Pannacciulli <jpnc@jpnc.info> | 2015-04-12 22:01:33 -0700 |
commit | 63f3763e5fb81afbf5ce70b756fbc90ad1909843 (patch) | |
tree | c847586ec81d2fcd3d863da2897f78c22d8ffbb4 | |
parent | 591502250a63621b729740a056369a819b6d49d9 (diff) | |
download | parssh-63f3763e5fb81afbf5ce70b756fbc90ad1909843.tar.gz parssh-63f3763e5fb81afbf5ce70b756fbc90ad1909843.tar.bz2 |
require server list; use '--' protection with ssh and allow as arg break
-rw-r--r-- | pars.sh | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -62,11 +62,19 @@ parssh () { _parssh.usage return $? ;; + -) + shift + break + ;; esac shift done [[ -z "$_parssh_servers" ]] && { + [[ -t 0 ]] && { + echo "No list of servers provided." + return 79 + } exec 9<&0 } || { exec 9<"$_parssh_servers" @@ -88,11 +96,11 @@ parssh () { } _parssh.ssh () { - ssh -no StrictHostKeyChecking=no $host "$@" + ssh -no StrictHostKeyChecking=no $host -- "$@" } _parssh.ssh_rinput () { - ssh -To StrictHostKeyChecking=no $host "$@" < "$_parssh_rinput" + ssh -To StrictHostKeyChecking=no $host -- "$@" < "$_parssh_rinput" } _parssh.host_prepend () |