I'd like to allow SSH password authentication from only a certain subnet. I see the option to disallow it globally in /etc/ssh/sshd_config
:
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
Is there a way to apply this configuration to a select range of IP addresses?
Use a
Match
block at the end of/etc/ssh/sshd_config
:Then tell the sshd service to reload its configuration:
you can add:
this changes default behaviour, really deny all other users from all hosts. Match block available on OpenSsh version 5.1 and above.