ssh 鏈接出現expecting SSH2_MSG_KEX_ECDH_REPLY失敗解決

   問題描述:linux

       ssh鏈接經過ipsec後鏈接卡住;ssh -vvv顯示:   ios

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,臨時生效bash

解決,爲何要這麼修改呢看這個大牛的:ssh

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

最重要就是下面這段了:spa


e083cb90a6d5b7a6e1bc41d54bd44852.png

2dab30972f00f9e1e78c1ad8f165d440.png

1a614cf8cd8bd6c3c77a56cccaa77099.png

上面是ipsec的兩種模式的圖解。.net

修改網卡配置,永久生效:debug

 

# 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設置

重啓網卡服務生效rest

service netword restart    #6server

systemctl restart network   #7


有什麼問題請留言,儘可能給你解決。

相關文章
相關標籤/搜索