Re: what "some file"?
Surely you are not suggesting the public key be placed in a file named "authorized_keys"!
Surely, I'm suggesting exactly that.
The /etc/ssh/sshd_config file explicitly states that that for PubkeyAuthentication the AuthorizedKeysFile containing the keys (presumably with any name) is in the ".ssh/authorized_keys" *folder*.
You will have to show us that "explicit statement".
https://man.openbsd.org/sshd_config says (note the part emphasized by me):
Specifies the file that contains the public keys used for user authentication. The format is described in the AUTHORIZED_KEYS FILE FORMAT section of sshd(8). Arguments to AuthorizedKeysFile accept the tokens described in the TOKENS section. After expansion, AuthorizedKeysFile is taken to be an absolute path or one relative to the user's home directory. Multiple files may be listed, separated by whitespace. Alternately this option may be set to none to skip checking for user keys in files. The default is “.ssh/authorized_keys .ssh/authorized_keys2”.
So the
.ssh/authorized_keys
refers clearly to a file, not any folder.