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

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

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

Message par Clippy »

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 : 9242
Inscription : mer. 22 avr. 2026, 17:21

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) »