github报错22端口超时 ssh: connect to host github.com port 22: Connection timed out
有勇气的牛排
391
git
2024-01-18 01:32:07
github报错22端口超时
配置文件
在 C:\Users\Administrator\.ssh
中配置如下文件:
文件名:config
(无后缀)
Host github.com
User ***@163.com(替换自己的邮箱)
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
检测
配置完文件后,首次检测会提示一个选择,选yes同意即可
ssh -T git@github.com

<h2><a id="github22_0"></a>github报错22端口超时</h2>
<h3><a id="_2"></a>配置文件</h3>
<p>在 <code>C:\Users\Administrator\.ssh</code>中配置如下文件:</p>
<p>文件名:<code>config</code> (无后缀)</p>
<pre><div class="hljs"><code class="lang-shell">Host github.com
User ***@163.com(替换自己的邮箱)
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
</code></div></pre>
<h3><a id="_17"></a>检测</h3>
<p>配置完文件后,首次检测会提示一个选择,选yes同意即可</p>
<pre><div class="hljs"><code class="lang-shell">ssh -T git@github.com
</code></div></pre>
<p><img src="https://static.couragesteak.com/article/0d549012a2f21730c9f7dc9d145b185a.png" alt="image.png" /></p>
留言