我今天安装了 Kubuntu 20.04,并试图设置我的 github 和 github 以与 SSH 一起使用。
已生成一对密钥 (~/.ssh/env),并且 ~/.ssh/config 配置设置如下:
Host glab
HostName gitlab.com
IdentityFile ~/.ssh/env
IdentitiesOnly yess
本地存储库配置如下:
[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/MY HOME FOLDER/”目录。
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).