SSH Key permission denied 11.1.11.2

:uk:/:us:

My YunoHost server

Hardware: VPS bought online (OVH)
YunoHost version: 11.1.11.2
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hello, I just upgraded to version 11.1.11.2, I can connect with my first user created via the webadmin.
However, I can no longer connect with my SSH key, either with my admin user or my user who is now the administrator. Is there anything I can do to rectify this? Or do I go through the OVH interface to connect directly to the server to change my SSH key?
The error message I get is :
Permission denied (publickey).

I take this opportunity to thank you again for what you do with Yunohost :slight_smile:

Cheers,


:fr:

Mon serveur YunoHost

Matériel: VPS acheté en ligne
Version de YunoHost: 11.1.11.2
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Bonjour, je viens d’effectuer ma mise à jour vers la version 11.1.11.2, je peux bien me connecter avec mon premier utilisateur créer via la webadmin.
Par contre, je ne peux plus me connecter avec ma clé SSH, que ce soit avec mon utilisateur d’admin ni mon utilisateur qui est dorénavant l’administrateur. Y a-t-il quelque chose à faire pour rectifier cela ? Ou bien est-ce que je passe par l’interface d’OVH pour me connecter directement au serveur pour modifier ma clé SSH ?

Le message d’erreur que j’obtiens est :
Permission denied (publickey).

Je profite de ce message pour vous remercier Ă  nouveau pour ce que vous faites avec Yunohost :slight_smile:

Cheers,

1 Like

I ran into this as well after the admin user migration. The issue was I never added my public key to my yunohost user, only to the admin user.

I did log in through the VM console to fix this.

Same here. SSH authentication is denied (publickey). Works only via password.

Can all of you connect on the server by other means, and run sudo tail -f /var/log/auth.log, then trigger the Permission denied (publickey) error again? The log might tell us why it is rejecting your public key.

1 Like

There you go:

Mar 1 21:53:04 XXXXX sshd[1250759]: Connection from xxx.xx.xxx.xxx port WWWWW on 192.168.1.5 port ZZZZZ rdomain “”
Mar 1 21:53:04 XXXXX sshd[1250759]: Authentication refused: bad ownership or modes for directory /home/admin
Mar 1 21:53:04 XXXXX sshd[1250759]: Failed publickey for admin from xxx.xx.xxx.xxx port YYYYY ssh2: RSA SHA256:BIIIIIIGGGGKEY

Since v11.1, user admin does not exist anymore. Please read YunoHost 11.1 release / Sortie de YunoHost 11.1 :wink: You will need to reinstate your public key to your own user, once you’ve made sure it is in the new admins group.

1 Like

I thought it might be this. But I liked the admin username so either I put it back on or created one user by that name. Does that mean that I have to follow this procedure again ? https://yunohost.org/en/security

I think this used is under the legacy admin something like this …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.