一例ssh无法连接问题

症状:

Connecting to 192.168.xxx.xxx:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Connection closing...Socket close.

Connection closed by foreign host.

查了两天,经一个朋友提醒,才发现是是Nat模式下,IP自动变化导致的。在VitualBox下不存在这个问题,WMware下默认Nat是2个小时过期。可以将Nat过期时间设置为9999天,或者设置固定IP即可解决。

posted @ 2024-02-20 11:06  zhaogaojian  阅读(17)  评论(0编辑  收藏  举报