Rogue sshd_config - PLZ USE MY KEY

Hello guys,

I have looked closely at the man page of sshd_config, and also looked on the internet but I haven’t figured out the following problem. I also don’t put this in support because I’m not blocked by it (nothing to do with filling the template @Aleks I promise ^^)

I have modified the sshd_config from yunohost just to set the authorizedkeysfile in /etc/ssh/%u/authorizedkeys (my /home folder is mounted on an encrypted volume, I need this to be able to ssh in the server when I’m rebooting and the drive is not yet mounted).

Everything works perfectly when I’m on the same network and I use the local IP of my server, on port 22.

I have added a redirection on my ISP box, port xxxx from the outside is redirected to port 22 on my yunohost.

And when I’m trying to ssh using my FDQN and the custom port, I’m asked for the user’s password, my SSH key is not recognised.

Do you have any idea how I could solve this, but more importantly understand why it’s behaving like this?

Thanks a lot :slight_smile:

Hum.

Today I learned that you should be careful as to where you put some parameters in your sshd_config file. For example, if you put it after a “Match” parameter do not expect your parameter to be taken in consideration outside of the expression of the Match.

:man_facepalming: