在工作中,我必须通过网关进行连接才能到达存储我们代码的计算机。我的笔记本电脑已安装Ubuntu 18.04。当我通过两个步骤连接到远程计算机时:
laptop: $ ssh login@gateway
gateway: $ ssh login@work_machine
它工作正常。但是,我已经为ssh设置了配置文件,以便可以直接从笔记本电脑连接以下内容:
Host gateway
Hostname gateway
User login
Host machine_from_laptop
Hostname work_machine
User login
Proxycommand ssh bdemoulin@gateway netcat -w1 %h %p %r
现在,我可以使用以下方法连接到远程计算机:
ssh machine_from_laptop
问题是,在2-3秒后,我断开了与错误消息的连接:
packet_write_wait: Connection to UNKNOWN port 65535
我曾经玩过ServerAliveInterval
或ServerAliveCountMax
和TCPKeepAlive
,但没有任何作用...而且我也无权访问服务器端参数。令我困扰的是,断开连接仅在我使用配置文件时出现...
有人知道配置有什么问题吗?