Bonjour,
J’ai revérifié ma conf 10 fois mais impossible de faire accepter ma clé rsa sur un serveur pour me connecter SSH.
Ma conf serveur (Debian buster):
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
PasswordAuthentication yes
Le log coté client:
~$ ssh -v kmc@ip.du.ser.ver
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1j 16 Feb 2021
debug1: Reading configuration data /home/kmc/.ssh/config
debug1: /home/kmc/.ssh/config line 2: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to ip.du.ser.ver [ip.du.ser.ver] port 22.
debug1: Connection established.
debug1: identity file /home/kmc/.ssh/id_rsa type 0
debug1: identity file /home/kmc/.ssh/id_rsa-cert type -1
debug1: identity file /home/kmc/.ssh/id_dsa type 1
debug1: identity file /home/kmc/.ssh/id_dsa-cert type -1
debug1: identity file /home/kmc/.ssh/id_ecdsa type -1
debug1: identity file /home/kmc/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/kmc/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/kmc/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/kmc/.ssh/id_ed25519 type -1
debug1: identity file /home/kmc/.ssh/id_ed25519-cert type -1
debug1: identity file /home/kmc/.ssh/id_ed25519_sk type -1
debug1: identity file /home/kmc/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/kmc/.ssh/id_xmss type -1
debug1: identity file /home/kmc/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to ip.du.ser.ver:22 as 'kmc'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:nTeppHr9F4b6xHKop7cjBLUqm9eP0/WmmOQ0t5Xv0MM
debug1: Host 'ip.du.ser.ver' is known and matches the ECDSA host key.
debug1: Found key in /home/kmc/.ssh/known_hosts:36
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/kmc/.ssh/id_rsa RSA SHA256:eHB/0b9qDKtiIsd4vY5xAth8pyCMD2PK5TUIsTVLGWQ
debug1: Will attempt key: /home/kmc/.ssh/id_dsa DSA SHA256:47M5b1btvNdXKJoTaQ9ktUUw2eralw0elF2ZkzlUr8s
debug1: Will attempt key: /home/kmc/.ssh/id_ecdsa
debug1: Will attempt key: /home/kmc/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/kmc/.ssh/id_ed25519
debug1: Will attempt key: /home/kmc/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/kmc/.ssh/id_xmss
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>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/kmc/.ssh/id_rsa RSA SHA256:eHB/0b9qDKtiIsd4vY5xAth8pyCMD2PK5TUIsTVLGWQ
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: /home/kmc/.ssh/id_dsa DSA SHA256:47M5b1btvNdXKJoTaQ9ktUUw2eralw0elF2ZkzlUr8s
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/kmc/.ssh/id_ecdsa
debug1: Trying private key: /home/kmc/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/kmc/.ssh/id_ed25519
debug1: Trying private key: /home/kmc/.ssh/id_ed25519_sk
debug1: Trying private key: /home/kmc/.ssh/id_xmss
debug1: Next authentication method: password
kmc@ip.du.ser.ver's password:
Je sais que c’est un sujet rabaché mais j’avoue que je suis à court et ce serait sympa si quelqu’un pouvait me mettre sur la voie.