Я установил Kubuntu 20.04 сегодня и пытаюсь настроить мой гитхаб и гитлаб для использования с SSH.
Одна ключ-пара была сгенерирована (~/.ssh/env), и конфиг ~/.ssh/config установлен следующим образом:
Host glab
HostName gitlab.com
IdentityFile ~/.ssh/env
IdentitiesOnly yess
На оба сайта ключ .pub был успешно добавлен.
Локальный репозиторий настроен таким образом:
[remote "origin"]
url = git@glab:REPOSNAME/service-logger.git
REPOSNAME = название моего репозитория.
Права доступа для директорий:
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
Где "." текущая директория, и ".." это "/home/МОЯ ДОМ. ПАПКА/".
Ssh-add -l показывает:
256 SHA256:mLphKZQdLR+iVKx5/jUa5NsCVo3swmuo79Yv6sw9mMs israfil22@whiteflame (ED25519)
Пустой вывод:
/var/log/auth.log | grep -a "ssh"
Логи ssh -vvT git@glab:
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.
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
Логи при вводе комманды "ssh -vv" ТАКИЕ ЖЕ:
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.
git@gitlab.com: Permission denied (publickey,keyboard-interactive).