Yiskiee 最近的时间轴更新
Yiskiee

Yiskiee

V2EX 第 582552 号会员,加入于 2022-05-24 13:28:06 +08:00
今日活跃度排名 16393
Yiskiee 最近回复了
49 天前
回复了 Yiskiee 创建的主题 问与答 多个 Github 账号配置 SSH Key 的问题
@ob 十分感谢! ssh -T 测试成功了, git 克隆私有库也成功了, 实在是不理解为什么会有这种问题.
50 天前
回复了 Yiskiee 创建的主题 问与答 多个 Github 账号配置 SSH Key 的问题
@ob 试了一下, 第一条配置存在, 但没有解决这个问题, 第二条配置不可用.
50 天前
回复了 Yiskiee 创建的主题 问与答 多个 Github 账号配置 SSH Key 的问题
@ob
@corvofeng
@charlie21
接上文:
执行 ssh -Tv [email protected], 结果如下 (回复受限, 去除了大部分内容):
```
Hi net! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3128, received 2752 bytes, in 0.7 seconds
Bytes per second: sent 4500.6, received 3959.6
debug1: Exit status 1
```

为各 Host 增加 IdentitiesOnly

执行 ssh -T [email protected]:
```
no such identity: $HOME/.ssh/id_rsa_net: No such file or directory
[email protected]: Permission denied (publickey).
```


执行 ssh -T [email protected]:
```
no such identity: $HOME/.ssh/id_rsa_com: No such file or directory
[email protected]: Permission denied (publickey).
```
50 天前
回复了 Yiskiee 创建的主题 问与答 多个 Github 账号配置 SSH Key 的问题
@ob
@corvofeng
@charlie21
为验证这些问题, 我将 id_rsa_com 和 id_rsa_net 分别移动到其他文件夹下.
将 config 文件中的所有内容注释, 删除 known_hosts 和 known_hosts.old
执行 ssh-add -D && ssh-add -l 确认没有内容后:
先移动 net 的 Key 后执行 ssh-add -k $HOME/.ssh/id_rsa_net
后移动 com 的 Key 后执行 ssh-add -k $HOME/.ssh/id_rsa_com
编辑 config 将 Host net 的内容移动到 Host com 之前, 其他只字未改.

执行 ssh -Tv [email protected], 结果如下:
```
OpenSSH_8.8p1, OpenSSL 3.0.5 5 Jul 2022
debug1: Reading configuration data /home/umze/.ssh/config
debug1: /home/umze/.ssh/config line 2: Applying options for net
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /home/umze/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Executing proxy command: exec ncat --proxy 127.0.0.1:1089 --proxy-type socks5 github.com 22
debug1: identity file $HOME/.ssh/id_rsa_net type -1
debug1: identity file $HOME/.ssh/id_rsa_net-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version babeld-f33ee42f
debug1: compat_banner: no match: babeld-f33ee42f
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /home/umze/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /home/umze/.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: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
debug1: load_hostkeys: fopen /home/umze/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /home/umze/.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: hostkeys_find_by_key_hostfile: hostkeys file /home/umze/.ssh/known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /home/umze/.ssh/known_hosts2 does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host 'github.com (<no hostip for proxy command>)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: [email protected] RSA SHA256:eQ5AqN8Y+p9cGo8eVzcxOMmJgDN3ivpCbcgA7jkkXeI agent
debug1: Will attempt key: [email protected] RSA SHA256:H790emQkwtjDRSnGyRxp0e+HnlxlAY5ruEFLrxw6VtQ agent
debug1: Will attempt key: $HOME/.ssh/id_rsa_net explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: [email protected] RSA SHA256:eQ5AqN8Y+p9cGo8eVzcxOMmJgDN3ivpCbcgA7jkkXeI agent
debug1: Server accepts key: [email protected] RSA SHA256:eQ5AqN8Y+p9cGo8eVzcxOMmJgDN3ivpCbcgA7jkkXeI agent
Authenticated to github.com (via proxy) using "publickey".
debug1: pkcs11_del_provider: called, provider_id = (null)
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: filesystem full
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: client_input_hostkeys: searching /home/umze/.ssh/known_hosts for github.com / (none)
debug1: client_input_hostkeys: searching /home/umze/.ssh/known_hosts2 for github.com / (none)
debug1: client_input_hostkeys: hostkeys file /home/umze/.ssh/known_hosts2 does not exist
debug1: Sending environment.
debug1: channel 0: setting env XMODIFIERS = "@im=ibus"
debug1: channel 0: setting env LANG = "en_US.UTF-8"
Learned new hostkey: RSA SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
Learned new hostkey: ECDSA SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM
Adding new key for github.com to /home/umze/.ssh/known_hosts: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
Adding new key for github.com to /home/umze/.ssh/known_hosts: ecdsa-sha2-nistp256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM
debug1: update_known_hosts: known hosts file /home/umze/.ssh/known_hosts2 does not exist
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi net! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3564, received 3176 bytes, in 0.7 seconds
Bytes per second: sent 5290.0, received 4714.1
debug1: Exit status 1
```
字数限制, 另起一个回复
手机 MS Edge 可以打开无警告, 电脑 Firefox 提示 Server Not Found.
107 天前
回复了 andyJado 创建的主题 问与答 firefox 地址栏和标签栏怎么隐藏啊, 看难受
按 F11
两岁也太早了吧
116 天前
回复了 shiftx 创建的主题 浏览器 求职业培训视频加速插件
117 天前
回复了 CNN 创建的主题 问与答 安卓手机有 Emoji 吗?
只显示了第二个 (Firefox 103.0; Fedora36)
关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1992 人在线   最高记录 5497   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 17:02 · PVG 01:02 · LAX 09:02 · JFK 12:02
Developed with CodeLauncher
♥ Do have faith in what you're doing.