Git issue : "Permission denied (publickey,keyboard-interactive)" with "ssh -T git@gitlab com" command

Hi, im trying to configure git to push an existing project.
So i followed the documentation step by step, but at the ssh configuration i have an issue when im trying test if i can connect with the command : ssh -T git@gitlab.com
But a this step i encounter an issue :

git@gitlab.com: Permission denied (publickey,keyboard-interactive).

Then i tried to print more information with : ssh -vT git@gitlab com

Result :
OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gitlab.com [2606:4700:90:0:f22e:fbec:5bed:a9b9] port 22.
debug1: Connection established.
debug1: identity file /c/Users/yousf/.ssh/id_rsa type -1
debug1: identity file /c/Users/yousf/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_dsa type -1
debug1: identity file /c/Users/yousf/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/yousf/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/yousf/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/yousf/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/yousf/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/yousf/.ssh/id_xmss type -1
debug1: identity file /c/Users/yousf/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5
debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5 pat OpenSSH* compat 0x04000000
debug1: Authenticating to gitlab.com:22 as β€˜git’
debug1: load_hostkeys: fopen /c/Users/name/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8
debug1: load_hostkeys: fopen /c/Users/name/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host β€˜gitlab.com’ is known and matches the ED25519 host key.
debug1: Found key in /c/Users/yousf/.ssh/known_hosts:1
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: /c/Users/name/.ssh/id_rsa
debug1: Will attempt key: /c/Users/name/.ssh/id_dsa
debug1: Will attempt key: /c/Users/name/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/name/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/name/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/name/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/name/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/name/.ssh/id_rsa
debug1: Trying private key: /c/Users/name/.ssh/id_dsa
debug1: Trying private key: /c/Users/name/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/name/.ssh/id_ecdsa_sk
debug1: Trying private key: /c/Users/name/.ssh/id_ed25519
debug1: Trying private key: /c/Users/name/.ssh/id_ed25519_sk
debug1: Trying private key: /c/Users/name/.ssh/id_xmss
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
git@gitlab com: Permission denied (publickey,keyboard-interactive).

Thanks you for help.

1 Like