Testing password auth

This commit is contained in:
Michael Stanclift 2020-05-24 21:51:04 -05:00
parent f61c8fa257
commit 3b4934398a

View File

@ -280,7 +280,7 @@ function validate_os_sshpass {
sshpassword='' sshpassword=''
MESSAGE="Using SSH Key-Pair Authentication" MESSAGE="Using SSH Key-Pair Authentication"
else else
sshpassword="sshpass -p ${REMOTE_PASS}" sshpassword="sshpass -p ${REMOTE_PASS} "
MESSAGE="Using SSH Password Authentication" MESSAGE="Using SSH Password Authentication"
fi fi
else else
@ -347,7 +347,7 @@ function md5_compare {
MESSAGE="Analyzing Remote ${GRAVITY_FI}" MESSAGE="Analyzing Remote ${GRAVITY_FI}"
echo -e "${STAT} ${MESSAGE}" echo -e "${STAT} ${MESSAGE}"
primaryMD5=$(ssh ${REMOTE_USER}@${REMOTE_HOST} 'md5sum /etc/pihole/gravity.db') primaryMD5=$(${sshpassword}ssh ${REMOTE_USER}@${REMOTE_HOST} 'md5sum /etc/pihole/gravity.db')
error_validate error_validate
MESSAGE="Analyzing Local ${GRAVITY_FI}" MESSAGE="Analyzing Local ${GRAVITY_FI}"
@ -366,8 +366,6 @@ function md5_compare {
} }
# SCRIPT EXECUTION ########################### # SCRIPT EXECUTION ###########################
validate_os_sshpass
MESSAGE="Evaluating Script Arguments" MESSAGE="Evaluating Script Arguments"
echo -e "${STAT} ${MESSAGE}" echo -e "${STAT} ${MESSAGE}"
@ -390,6 +388,7 @@ case $# in
echo -e "${INFO} ${MESSAGE}" echo -e "${INFO} ${MESSAGE}"
validate_gs_folders validate_gs_folders
validate_ph_folders validate_ph_folders
validate_os_sshpass
pull_gs pull_gs
exit exit
@ -403,6 +402,7 @@ case $# in
echo -e "${INFO} Validating Folder Configuration" echo -e "${INFO} Validating Folder Configuration"
validate_gs_folders validate_gs_folders
validate_ph_folders validate_ph_folders
validate_os_sshpass
push_gs push_gs
exit exit
@ -444,7 +444,11 @@ case $# in
echo -e "${GOOD} ${MESSAGE}" echo -e "${GOOD} ${MESSAGE}"
import_gs import_gs
md5_compare
echo -e "${INFO} Validating Folder Configuration"
validate_gs_folders
validate_ph_folders
validate_os_sshpass
;; ;;
cron) cron)