美文网首页
ssh: connect to host github.com

ssh: connect to host github.com

作者: AsaGuo | 来源:发表于2018-08-20 10:27 被阅读15次
    1. 原因可能是端口被占用
    2. 在 ~/.ssh目录下创建个文件名为config的文件
    $ touch config
    
    1. 填写如下内容并保存
    Host github.com
    User git
    Hostname ssh.github.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa
    Port 443
    
    1. 测试
    $ ssh -T git@github.com
    The authenticity of host '[ssh.github.com]:443 ([192.30.252.1]:443)' can't be established.
    RSA key fingerprint is SHA256:nThARLviKw6E5SYbg6kXUpJWGl7E1IGOCspRomTxdC8.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '[ssh.github.com]:443,[192.30.252.1]:443' (RSA) to the list of known hosts.
    Hi [your name]! You've successfully authenticated, but GitHub does not provide shell access.
    # 虽然有个警告,这个GitHub上有人说这个只要IP是在192.30.252.0到192.30.255.255之间的话是没关系的。
    

    相关文章

      网友评论

          本文标题:ssh: connect to host github.com

          本文链接:https://www.haomeiwen.com/subject/yjskiftx.html