赞
踩
ssh: connect to host github.com port 22: Connection refused
是连接github.com的端口号22拒绝连接。
可以使用github的443端口。
~/.ssh/config
中添加如下字段:$ vim ~/.ssh/config
# 如果没有config 文件就新建一个
Host github.com
Hostname ssh.github.com
Port 443
ssh -T git@github.com
如果出现如下字段则验证成功
The authenticity of host ‘[ssh.github.com]:443 ([20.205.243.160]:443)’ can’t be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘[ssh.github.com]:443,[20.205.243.160]:443’ (ECDSA) to the list of known hosts.
Hi githubName! You’ve successfully authenticated, but GitHub does not provide shell access.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。