Skip to content

Commit

Permalink
adding -n to help with zabbix key expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
patricegautier committed Jun 25, 2024
1 parent abe734d commit 2b9e46d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssh-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Usage ${0} -i privateKeyPath -p <passwordFilePath> -u user -v -d targetDevice <
-d IP or FQDN for Unifi device
-v verbose and non compressed output
-r explicitly allow RSA (for legacy devices, i.e Airmaxes)
-n empty option, to provide a default for zabbix key expansion
EOF
exit 2
}
Expand All @@ -20,7 +21,7 @@ declare PRIVKEY_OPTION=
declare PASSWORD_FILE_PATH=
declare SSH_OPTIONS="-o LogLevel=Error -o StrictHostKeyChecking=accept-new"

while getopts 'i:u:hd:vp:r' OPT
while getopts 'i:u:hd:vp:rn' OPT
do
case $OPT in
i) PRIVKEY_OPTION="-i "${OPTARG} ;;
Expand All @@ -29,6 +30,7 @@ do
v) VERBOSE="-v" ;;
p) PASSWORD_FILE_PATH=${OPTARG} ;;
r) SSH_OPTIONS+=" -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa" ;;
n) true ;;
*) usage ;;
esac
done
Expand Down

0 comments on commit 2b9e46d

Please sign in to comment.