将 Ubuntu 服务器从 12.04 升级到 14.04 后,我现在无法通过 发送(较大的)文件scp
。此外,bzr
服务器的更新和提交不可靠,大概是如果总数据传输超过600 千字节。
两者都不这解决方案列表,也不是这个受欢迎的解决方法列表,已经起作用。
此外,14.04 不再运行 2.4 或 2.6 内核。
最后,我无法升级服务器直到16.04.1版本发布。
(编辑:过了一段时间,服务器成功升级到15.10,但问题仍然存在。)
有什么建议吗?
编辑:针对以下评论,详细日志scp
是这里:
$ scp -v test.7z [email protected]:/tmp
Executing: program /usr/bin/ssh host host.com, user user, command scp -v -t /tmp
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 1: Applying options for host.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to host.com [xx.yy.zz.aa] port bb.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.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.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA xx:yy:zz...
debug1: Host '[host.com]:bb' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Trying private key: /home/user/.ssh/id_ecdsa
debug1: Trying private key: /home/user/.ssh/id_ed25519
debug1: Next authentication method: password
[email protected]'s password:
debug1: Authentication succeeded (password).
Authenticated to host.com ([xx.yy.zz.aa]:bb).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_ZA.UTF-8
debug1: Sending command: scp -v -t /tmp
Sending file modes: C0664 3367893 test.7z
Sink: C0664 3367893 test.7z
test.7z 64% 2112KB 536.8KB/s - stalled
编辑:15.10 以下转接(有速度限制)。我一直都这么ssh
keepalive
设置。
Sending file modes: C0775 4243669 test.jar
test.jar 0% 0 0.0KB/s --:-- ETA
Sink: C0775 4243669 test.jar
test.jar 23% 976KB 16.2KB/s 03:15 ETA
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 1
test.jar 46% 1936KB 16.0KB/s 02:18 ETA
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 1
test.jar 50% 2112KB 0.0KB/s - stalled -
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 1
test.jar 50% 2112KB 0.0KB/s - stalled -
答案1
经过大量测试并尝试各种解决方案后,我通过搜索“scp pause”和“scp 2112kb”等找到了这些解决方案,但这些解决方案都无法解决问题,因此我认为问题可能与硬件有关,尽管只有scp
传输出现停滞(所有其他网络连接和下载均不受影响)。
我把路由器换成了另一个(更旧的)型号(我想也是不同的品牌),这似乎解决了这个问题。