Add `status` verb

master
BrainwreckedTech 2 years ago
parent d5322a5bd4
commit 1c05f8fcba

@ -16,6 +16,9 @@ case "${1}" in
FROM=no; TO=yes;
fi
;;
status)
true
;;
*)
echo 'Must specify one of the following:'
echo ' [ on | yes | enable | unlock ] to allow interactive passwords'
@ -27,7 +30,7 @@ case "${1}" in
esac
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
done

Loading…
Cancel
Save