Bonjour à tous, j'ai déployé un openssh-server sur une machine Windows via cette procédure :

https://winscp.net/eng/docs/guide_wi...authentication

Tout est opérationnel avec une authentification classique.

Je tente à présent de mettre en place une authentification par clef privé/public

Sur mon serveur SSH (Windows)
Dans C:\users\useronserver\.ssh j'ai mon "authorized_keys" avec la clef public généré sur mon client, et dans mon client j'ai bien ma private key dans .ssh, j'ai également copié la clef publique dans C:\users\useronserver\.ssh

id_rsapublic.pub

lors d'une tentative de connection via clef privé/public,
Les logs du client SSH me retourne :


debug1: Found key in /home/myusertest/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug2: key: /home/myusertest/.ssh/id_rsa ((nil))
debug2: key: /home/myusertest/.ssh/id_dsa ((nil))
debug2: key: /home/myusertest/.ssh/id_ecdsa ((nil))
debug2: key: /home/myusertest/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/myusertest/.ssh/id_rsa
debug3: sign_and_send_pubkey: RSA SHA256:oywphpqqdsfGEIjdgsmtly3sdfw2iCGfVYJacAFc
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/myusertest/.ssh/id_dsa
debug3: no such identity: /home/myusertest/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/myusertest/.ssh/id_ecdsa
debug3: no such identity: /home/myusertest/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/myusertest/.ssh/id_ed25519
debug3: no such identity: /home/myusertest/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).



Les logs du serveur SSH me retourne :


9540 16:59:06:661 Accepted password for useronserver from 10.0.0.10 port 1390 ssh2
9540 16:59:08:917 Received disconnect from 10.0.0.10 port 1390:11: disconnected by user
9540 16:59:08:917 Disconnected from user useronserver 10.0.0.10 port 1390
15952 16:59:27:315 Connection closed by authenticating user useronserver 10.0.0.10 port 1398

Je ne vois pas trop ou j'ai pus me tromper si quelqu'un à une suggestion ... nous sommes vendredi il est probable que je sois quelque peut fatigué

Dans les logs sur client, il prend bien en compte ma private key puis plus rien


debug1: Next authentication method: publickey
debug1: Trying private key: /home/myusertest/.ssh/id_rsa
debug3: sign_and_send_pubkey: RSA SHA256:oywphpqqdsfGEIjdgsmtly3sdfw2iCGfVYJacAFc
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
J'ai bien effectué l'opération : icacls C:\users\useronserver\.ssh /grant "NT Service\sshd:R" /T