ssh 连接出现expecting SSH2_MSG_KEX_ECDH_REPLY失败解决

   问题描述:

       ssh连接通过ipsec后连接卡住;ssh -vvv显示:   

debug2: kex_parse_kexinit: none,
debug2: kex_parse_kexinit: none,
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

echo "1420" > /sys/class/net/eth0/mtu  #把mtu值设置一下默认是1500,临时生效

解决,为什么要这么修改呢看这个大牛的:

http://blog.csdn.net/linuxkernelciscoios/article/details/54584853

最重要就是下面这段了:


e083cb90a6d5b7a6e1bc41d54bd44852.png

2dab30972f00f9e1e78c1ad8f165d440.png

1a614cf8cd8bd6c3c77a56cccaa77099.png

上面是ipsec的两种模式的图解。

修改网卡配置,永久生效:

 

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0                              #网卡对应的设备别名
BOOTPROTO=static                    #网卡获得ip地址的方式(默认为dhcp,表示自动获取)
HWADDR=00:07:E9:05:E8:B4    #网卡MAC地址(物理地址)
IPADDR=192.168.100.100          #IP地址
NETMASK=255.255.255.0          #子网掩码 
ONBOOT=yes                              #系统启动时是否激活此设备
MTU=1420            #MTU设置

重启网卡服务生效

service netword restart    #6

systemctl restart network   #7


有什么问题请留言,尽量给你解决。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章