github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
2023-09-27 14:24:55 时间
1. 异常
在连接github时,执行”ssh -T git@github.com” 命令时,出现
ssh: connect to host github.com port 22: Connection timed out
2. 解决方法
在存放公钥私钥(id_rsa和id_rsa.pub)的文件里,新建config文本,内容如下:
Host github.com
User YourEmail@163.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
其中User为登录github的账号名称。
再次执行”ssh -T git@github.com”时,会出现提示如下,回车”yes”即可。
这时验证就可以通过。
相关文章
- 使用SSH端口做端口转发以及反向隧道
- SSH Key - Still asking for password and passphrase
- MVC+Spring.NET+NHibernate .NET SSH框架整合 C# 委托异步 和 async /await 两种实现的异步 如何消除点击按钮时周围出现的白线? Linq中 AsQueryable(), AsEnumerable()和ToList()的区别和用法
- LINUX随笔十 SFTP不支持 ssh-dss,ssh-rsa
- Unable to negotiate with XXXX port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
- linux中sshd是什么(ssh服务无法启动解决办法)
- [ssh] 本地访问远程服务器上的ui页面
- [转]SSH和SSM对比总结
- github.com 连不了 Connection refused ssh.github.com port 443 22
- Linux中ssh实现免密登录
- 无需公网IP,远程SSH访问Linux服务器!