Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4483944
  • 博文数量: 356
  • 博客积分: 10458
  • 博客等级: 上将
  • 技术积分: 4734
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-24 14:59
文章分类

全部博文(356)

文章存档

2020年(17)

2019年(9)

2018年(26)

2017年(5)

2016年(11)

2015年(20)

2014年(2)

2013年(17)

2012年(15)

2011年(4)

2010年(7)

2009年(14)

2008年(209)

分类: LINUX

2015-02-11 19:14:42

解决ssh连接提示Connection closed by xx
某一天ssh连接外网的一个服务器A,突然连不了了,会提示:Connection closed by A的ip,连局域网内的一台服务器B却没有问题,(机子均为linux)
服务器B上ssh连接A没有问题,但是无法用scp传文件给A,传输会一直挂住。
改了各种配置文件,没有解决。

输出信息如下:
 ssh -v a@10.80.97.241
 OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: /etc/ssh/ssh_config line 20: Applying options for *
 debug1: Connecting to 10.80.97.241 [10.80.97.241] port 22.
 debug1: Connection established.
 debug1: identity file /home/zengming/.ssh/id_rsa type -1
 debug1: identity file /home/zengming/.ssh/id_rsa-cert type -1
 debug1: identity file /home/zengming/.ssh/id_dsa type -1
 debug1: identity file /home/zengming/.ssh/id_dsa-cert type -1
 debug1: identity file /home/zengming/.ssh/id_ecdsa type -1
 debug1: identity file /home/zengming/.ssh/id_ecdsa-cert type -1
 debug1: identity file /home/zengming/.ssh/id_ed25519 type -1
 debug1: identity file /home/zengming/.ssh/id_ed25519-cert type -1
 debug1: Enabling compatibility mode for protocol 2.0
 debug1: Local version string SSH-2.0-OpenSSH_6.6.1
 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
 debug1: match: OpenSSH_6.4 pat OpenSSH* compat 0x04000000
 debug1: SSH2_MSG_KEXINIT sent
 debug1: SSH2_MSG_KEXINIT received
 debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
 debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
 debug1: sending SSH2_MSG_KEX_ECDH_INIT
 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
 Connection closed by 10.80.97.241

后面在本机上修改了mtu为1500以下就好了:
sudo ifconfig enp0s25 mtu 1200
作者:帅得不敢出门  程序员群:31843264
阅读(54814) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~