I
I
Israfil222020-12-12 15:47:35
linux
Israfil22, 2020-12-12 15:47:35

Why can't I log in via SSH in gitlab, github, etc. (permission denied)?

I installed Kubuntu 20.04 today and am trying to set up my github and github for use with SSH.
One key pair has been generated (~/.ssh/env) and the ~/.ssh/config config is set as follows:

Host glab
 HostName gitlab.com
 IdentityFile ~/.ssh/env
 IdentitiesOnly yess


The .pub key was successfully added to both sites.

The local repository is configured like this:
[remote "origin"]
        url = [email protected]:REPOSNAME/service-logger.git

REPOSNAME = name of my repository.

Directory permissions:
ls -loga ~/.ssh

drwx------  2 4096 дек 12 18:00 .
drwxr-xr-x 23 4096 дек 12 16:45 ..
-rwx------  1  153 дек 12 18:00 config
-rwx------  1  411 дек 12 15:26 env
-rwx------  1  102 дек 12 15:26 env.pub


Where "." the current directory, and ".." is "/home/MY HOME FOLDER/".

ssh-add -l shows:

256 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs [email protected] (ED25519)


Empty output:
/var/log/auth.log | grep -a "ssh"

Logs ssh -vvT [email protected]:
debug1: Will attempt key: /home/israfil22/.ssh/env ED25519 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs explicit agent
debug2: pubkey_prepare: done
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>
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/israfil22/.ssh/env ED25519 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs explicit agent
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,keyboard-interactive).


The logs when entering the "ssh -vv" command are THE SAME:
debug1: Will attempt key: /home/israfil22/.ssh/env ED25519 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs explicit agent
debug2: pubkey_prepare: done
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>
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/israfil22/.ssh/env ED25519 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs explicit agent
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,keyboard-interactive).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Volkov, 2020-12-13
@voleg4u

Repeat the whole procedure, only use an RSA type key.
$ ssh-keygen -t rsa -b 2048 blah-blah-blah

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question