我的HPC安装了LSF作业调度程序。
我登录登录节点(我使用xshell)并使用交互式作业提交命令
bsub -Is csh因此,我输入了一个HPC节点,例如c01节点。
然后我想输入另一个节点,例如c02,所以我使用
ssh c02我成功地进入了c02节点。但几分钟后,连接就关闭了。信息是
Connection to c02 closed by remote host.
Connection to c02 closed.使用ssh -vvv c02生成以下消息
debug3: Wrote 64 bytes for a total of 2925
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)
debug3: channel 0: close_fds r 4 w 5 e 6 c -1
Connection to c02 closed by remote host.
Connection to c02 closed.
Transferred: sent 2744, received 2384 bytes, in 158.3 seconds
Bytes per second: sent 17.3, received 15.1
debug1: Exit status -1发布于 2015-10-19 15:48:37
你可以试着让SSH活下来。在c01上创建或添加以下内容到~/..ssh/config
host c02
ServerAliveCountMax 30
ServerAliveInterval 60
TCPKeepAlive yes这将保持每60秒发送一条TCP保持活动消息,持续30分钟。https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5
确保按以下方式设置权限:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/config这些选项也可以放在命令行上,但是我发现一个配置文件可以使事情变得更简单。如果您想将它们应用于每个主机,那么就不要使用host c02,而是使用host *。因为可能有一个共享的文件系统,这将适用于所有ssh连接。
注意:这些选项可以在sshd_config中禁用,如果是的话,它们就不能工作了。
另一个可能有效的选项是运行一个交互式命令,如:watch ls ~
https://unix.stackexchange.com/questions/237158
复制相似问题