Ubuntu 14.04下OpenSSH/Git问题

Ubuntu 14.04下OpenSSH/Git问题

我正在使用 Ubuntu 14.04,并试图通过 ssh 克隆 git 存储库。不幸的是,由于 openssh-client 存在问题,此操作无法进行。

一开始我无法连接到 SSH 服务器。产生了以下调试输出:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to test.com [ommitted] port 22.
debug1: Connection established.
debug1: identity file /home/jan/.ssh/id_rsa type 1
debug1: identity file /home/jan/.ssh/id_rsa-cert type -1
debug1: identity file /home/jan/.ssh/id_dsa type -1
debug1: identity file /home/jan/.ssh/id_dsa-cert type -1
debug1: identity file /home/jan/.ssh/id_ecdsa type -1
debug1: identity file /home/jan/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/jan/.ssh/id_ed25519 type -1
debug1: identity file /home/jan/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

按照以下说明取消注释 /etc/ssh/ssh_config 中的 Ciphers 和 MACs 行后https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/174168。我可以通过 ssh 连接。

不幸的是,我仍然无法使用 ssh 通过 git 克隆存储库:

jan@jan-ThinkPad-T510:~$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone   ssh://user@host/path/to/repo
trace: built-in: git 'clone' 'ssh://user@host/path/to/repo' Cloning into 'repo'...
trace: run_command: 'ssh' 'user@host' 'git-upload-pack '\''/path/to/repo'\'''

知道是什么原因导致了这个问题吗?

答案1

该问题是由于我的互联网提供商(KabelBW)的 MTU 设置不同以及防火墙配置错误而发生的。

我通过将 MTU 设置为 576 解决了该问题

ifconfig wlan0 mtu 576

请注意,设置 MTU 后,您必须断开连接并重新连接到网络。有关更多详细信息,请参阅Snailbook MTU 不匹配

相关内容