diff --git a/sshdpw b/sshdpw index b7b091e..2007b82 100755 --- a/sshdpw +++ b/sshdpw @@ -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