You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Linux Mint 21下OpenSSH_8.9连接GitHub超时问题求助

OpenSSH_8.9 连接GitHub超时错误

我已生成SSH密钥并添加至GitHub个人主页的SSH密钥/认证密钥列表中,能ping通GitHub,但通过SSH连接时出现超时错误:

# 连接GitHub
usu@serv:~$ ssh -vT git@github.com

OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: connect to address 140.82.121.3 port 22: Connection timed out
ssh: connect to host github.com port 22: Connection timed out

我推测GitHub不接受OpenSSH_8.9p1版本发起的连接,因此安装了旧版本OpenSSH-7.6(Linux Mint 19所使用的版本),这需要先安装已弃用的OpenSSL-1.0.2u,具体步骤如下:

安装前置依赖

sudo apt install libssl-dev
sudo apt install zlib1g-dev libz-dev

安装流程

1. 安装zlib-1.3

tar -xvf zlib-1.3.tar.gz
cd zlib-1.3
./configure
sudo make
sudo make install

2. 安装OpenSSL 1.0.2u

tar -xvf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./config
sudo make install

3. 安装OpenSSH-7.6p1

tar -xvf openssh-7.6p1.tar.gz
cd openssh-7.6p1
./configure --without-zlib-version-check exec_prefix=/usr --without-openssl-header-check -with-ssl-dir=/usr/local/ssl
sudo make
sudo make install

内容的提问来源于stack exchange,提问作者Rafael

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 13:52:56