AllowUsers with nothing following it in sshd_config file?

I have no way of testing this and can't find the answer online. If I put AllowUsers in my sshd_config file with nothing following it would the behavior be to allow everyone to SSH into the computer, or to deny everyone?

Example:

// all of sshd_conf file...
AllowUsers
4

1 Answer

If I put AllowUsers in my sshd_config file with nothing following it would the behavior be to allow everyone to SSH into the computer, or to deny everyone?

It is so hard to try?

echo "AllowUsers" > /etc/ssh/sshd_config
systemctl restart sshd
systemctl status sshd # no error
ssh user@localhost # succeed

So yes, you can put there AllowUsers option without argument and it will behave like there would be no option (all users will be allowed, if you don't specify any DenyUsers or any AllowUsers before).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like