![从 Win 到 Fedora 的 VNC 会话在短时间内锁定 - 如何增加会话不活动超时?](https://linux22.com/image/1631524/%E4%BB%8E%20Win%20%E5%88%B0%20Fedora%20%E7%9A%84%20VNC%20%E4%BC%9A%E8%AF%9D%E5%9C%A8%E7%9F%AD%E6%97%B6%E9%97%B4%E5%86%85%E9%94%81%E5%AE%9A%20-%20%E5%A6%82%E4%BD%95%E5%A2%9E%E5%8A%A0%E4%BC%9A%E8%AF%9D%E4%B8%8D%E6%B4%BB%E5%8A%A8%E8%B6%85%E6%97%B6%EF%BC%9F.png)
从 Win 到 Fedora 的 VNC 会话在短时间内锁定。以下方法有效,但重复执行此操作很繁琐
-bash$ loginctl list-sessions
SESSION UID USER SEAT
1 17666 u1
1140 60046 u2
1186 60046 u3
1185 60046 u4
c1 42 gdm seat0
5 sessions listed.
-bash$ sudo loginctl unlock-session 1140
-bash$ sudo loginctl unlock-session 1186
-bash$ sudo loginctl unlock-session 1185
-bash$
我增加了ClientAliveInterval
但是/etc/ssh/sshd_config
:
-bash$ sudo service sshd restart
Redirecting to /bin/systemctl restart sshd.service
Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.
有任何方法可以增加会话的超时时间。
答案1
后续作品
loginctl list-sessions <- this get session numbers
loginctl unlock-session <session #> <- this unlocks the session
这通常会解锁会话,并且同样也会反映在 vnc 上。