Jas*_*son 16 ssh git openssh github
我在 ubuntu 13.10 和 12.10 中遇到了一个问题,尝试连接到 github(git clone / pull / push 或任何东西)会失败并且没有输出。
我检查了我的 /.ssh 目录config
和任何 ssh 密钥。没有配置文件,并且 ssh 密钥id_rsa
与我的 github.com 帐户上的相同。
我尝试 ping github 服务器并且也可以。
我按照 github 指南来调试情况 - 它建议
ssh -T -v git@github.com
Run Code Online (Sandbox Code Playgroud)
输出停止在:
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Run Code Online (Sandbox Code Playgroud)
任何人都有一个解决方案可以让我的 git pull / push 等工作。
Jas*_*son 19
在这里找到了解决方案:SSH 在腻子中工作,但在终端中不工作
在 Ubuntu 13.10/12.10 中,登录并获得 sudo 访问权限。
编辑/etc/ssh/ssh_config
,取消注释以下几行
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
Run Code Online (Sandbox Code Playgroud)
添加以下行
HostKeyAlgorithms ssh-rsa,ssh-dss
Run Code Online (Sandbox Code Playgroud)
你的/etc/ssh/ssh_config
文件最终应该是这样的
Host *
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
HostKeyAlgorithms ssh-rsa,ssh-dss
Run Code Online (Sandbox Code Playgroud)
现在运行ssh -T -v git@github.com
,它会要求您将服务器添加到您已知的主机文件中。点击是,然后它应该欢迎你到服务器。
Hi ****! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)
更改网络接口MTU即可解决。这是 ubuntu 14.04 的一个错误。
这对我有用:
sudo ip li set mtu 1200 dev wlan0
Run Code Online (Sandbox Code Playgroud)
ssh 无法连接到 VPN 主机 - 在“期待 SSH2_MSG_KEX_ECDH_REPLY”时挂起
归档时间: |
|
查看次数: |
37180 次 |
最近记录: |