#!/bin/sh

. /etc/control.d/functions

CONFIG=/etc/openssh/sshd_config

new_subst enabled \
	'^PasswordAuthentication[[:space:]]+yes' \
	's/^#\?\(PasswordAuthentication\)[[:space:]]\+.*/\1 yes/'
new_subst disabled \
	'^PasswordAuthentication[[:space:]]+no' \
	's/^#\?\(PasswordAuthentication\)[[:space:]]\+.*/\1 no/'
new_subst default \
	'^#PasswordAuthentication yes' \
	's/^#\?\(PasswordAuthentication\)[[:space:]]\+.*/#\1 yes/'

new_help enabled 'Enable password authentication'
new_help disabled 'Disable password authentication'
new_help default 'Reset password authentication setting to the package default'

new_summary 'OpenSSH server PasswordAuthentication configuration'

control_subst "$CONFIG" "$*"
