Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
deepin终端ssh总是掉线
Experiences and Insight
2941
views ·
7
replies ·
To
floor
Go
bibichuan
deepin
2020-03-23 01:33
Author
使用deepin的终端进行ssh链接,总是一会就掉线了,无法操作,卡住,然后无法输入,只能强制结束终端,才能退出。然后再次连接编辑。
Reply
Like 0
Favorite
View the author
All Replies
捕风
deepin
2020-03-23 02:31
#1
这个问题对于开发人员确实很麻烦。希望官方重视下啊
Reply
Like 0
View the author
jarvanzx
deepin
2020-03-23 17:42
#2
这恐怕不是深度终端的问题,我再win端powershell也一样,ssh登录云服务器,一直操作还好,只要切换窗口,很快就不能操作了,只能重开
Reply
Like 0
View the author
deepinuser17
deepin
2020-03-23 17:49
#3
这个一般是网络问题
Reply
Like 0
View the author
陈思煜
deepin
2020-03-23 21:12
#4
这个只要用ssh就会有的问题, 不然怎么会有ss出现呢
Reply
Like 0
View the author
aida
deepin
2020-03-23 21:33
#5
https://bbs.deepin.org/post/189935
这个问题对于开发人员确实很麻烦。希望官方重视下啊
这个跟服务器或者客户端的配置有关系,以下两种方法二选一即可
参考
https://wiki.archlinux.org/index.php/Secure_Shell_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E4%BF%9D%E6%8C%81%E5%9C%A8%E7%BA%BF
默认情况下,如果你的会话空闲了某个时间之后,它会自动登出。为了保持会话,在长时间没有数据传输时客户端可以向服务器发送一个激活信号。与之对应,服务器也可以在一段时间没有收到消息时定期发送一个信号。
在
服务器
,ClientAliveInterval 是没有从客户端收到消息后的超时时间,超时后
sshd
将会发送一个请求来等待回应。默认是 0,指不会发出请求。比如要求每隔 60 秒向客户端发送响应请求,在你的 [color=rgb(102, 102, 102) !important]
服务器配置
里设置 ClientAliveInterval 60 即可。ClientAliveCountMax 和 TCPKeepAlive 选项也可以参考一下。
在
客户端
,ServerAliveInterval 控制着从客户端发往服务器的响应请求的时间间隔。比如要求服务器每隔 120 秒响应一次,在你的 [color=rgb(102, 102, 102) !important]
客户端配置
里加入 ServerAliveInterval 120 即可。ServerAliveCountMax 和 TCPKeepAlive 选项也可以参考一下。
注意:
为确保会话保持活动状态,客户端或服务器中只有一个需要发送保持活动请求。如果用户同时控制服务器和客户端,那么合理的选择是使用 ServerAliveInterval 选项配置需要保持会话的客户端,并保留其他客户端和服务器的默认配置。
配置文件在/etc/ssh里面
客户端配置文件/etc/ssh/ssh_config
服务器配置文件/etc/ssh/sshd_config
默认的配置是为了安全考虑,关闭keepalive。因为假如您在电脑前忘记登出,那么其他人可能轻易地使用您的服务器。
Reply
Like 0
View the author
bibichuan
deepin
2020-09-08 18:02
#6
这个不是用ssh就会出现的问题,我在使用MobaXterm这个软件进行ssh连接的时候,从来不会莫名奇妙的卡住,即便是连接同一台服务器。
Reply
Like 0
View the author
陈思煜
deepin
2020-09-08 18:27
#7
这个只有中国才会有的奇怪问题 建议用代理
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Events
More