Add `status` verb

master
BrainwreckedTech 2 years ago
parent d5322a5bd4
commit 1c05f8fcba

@ -16,6 +16,9 @@ case "${1}" in
FROM=no; TO=yes; FROM=no; TO=yes;
fi fi
;; ;;
status)
true
;;
*) *)
echo 'Must specify one of the following:' echo 'Must specify one of the following:'
echo ' [ on | yes | enable | unlock ] to allow interactive passwords' echo ' [ on | yes | enable | unlock ] to allow interactive passwords'
@ -27,7 +30,7 @@ case "${1}" in
esac esac
for OPTION in PasswordAuthentication KbdInteractiveAuthentication ChallengeResponseAuthentication; do for OPTION in PasswordAuthentication KbdInteractiveAuthentication ChallengeResponseAuthentication; do
sed -i "s/#* *${OPTION} *${FROM}/${OPTION} ${TO}/g" /etc/ssh/sshd_config [ -n "${FROM}" ] && sed -i "s/#* *${OPTION} *${FROM}/${OPTION} ${TO}/g" /etc/ssh/sshd_config
grep "^#* *${OPTION} *\(yes\|no\)" /etc/ssh/sshd_config grep "^#* *${OPTION} *\(yes\|no\)" /etc/ssh/sshd_config
done done

Loading…
Cancel
Save