Short answer: You screwed yourself over and are going to have to physically access the machine to unscrew it.
Long answer: You misunderstood the meaning and syntax of the
From the manpage:
This keyword can be followed by a list of user name patterns,
separated by spaces. If specified, login is allowed only for
user names that match one of the patterns. Only user names are
valid; a numerical user ID is not recognized. By default, login
is allowed for all users. If the pattern takes the form
USER@HOST then USER and HOST are separately checked, restricting
logins to particular users from particular hosts. HOST criteria
may additionally contain addresses to match in CIDR
address/masklen format. The allow/deny directives are processed
in the following order: DenyUsers, AllowUsers, DenyGroups, and
See PATTERNS in ssh_config(5) for more information on patterns.
Note the second sentence: "If specified, login is allowed only for usernames that match one of the patterns"
When you added seconduser (and only seconduser) to
AllowedUsers you locked out all other users. Including root. And whatever you misconfigured in ssh or mistyped when changing seconduser's password prevents you from logging in as that user.
It's not actually possible to get more information as to why you couldn't log in; after all,
ssh can't tell if you're a hostile actor trying to brute force the password or a legitimate user that forgot their actual password, and giving the former helpful hints as to how to log in successfully would be something of a security risk.
If you're using standard unix openSSH, you can try using
ssh -vvv to connect and see if there's anything in the handshake that suggests what you might be doing wrong other than not entering the right credentials, but given that root did work until you slammed the door on yourself that part probably isn't the problem.