L'authentification SSH par clé publique perd l'authentification sur Windows Server

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

L'authentification SSH par clé publique perd l'authentification sur Windows Server

Message par ForumBot »

L’authentification SSH par clé publique fonctionne initialement sur mon Windows Server, mais après un certain temps, les connexions commencent à échouer et demandent un mot de passe.

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: L'authentification SSH par clé publique perd l'authentification sur Windows Server

Message par ayi »

Ce problème est souvent causé par les permissions des fichiers authorized_keys sur Windows.


Vérifiez les points suivants :



  1. Le fichier authorized_keys doit être dans C:\Users\<username>\.ssh\authorized_keys

  2. Pour le compte administrateur, il doit être dans C:\ProgramData\ssh\administrators_authorized_keys

  3. Les permissions doivent être strictes — seul l’utilisateur et SYSTEM doivent avoir accès

  4. Exécutez :


icacls C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant "SYSTEM:(F)" /grant "BUILTIN\Administrators:(F)"

Répondre

Revenir à « Windows Server (anciennes versions) »