webssh icon indicating copy to clipboard operation
webssh copied to clipboard

SSH KeepAlive

Open ssnmworld opened this issue 3 years ago • 4 comments

Hi - Is there any option that supports SSH KeepAlive seconds as it is supported in Putty ?

Some of our servers terminate SSH session - so we enable this options to have the session alive till the user terminates. Is there a way I can enable that in webssh ?

Thanks

ssnmworld avatar Nov 01 '21 18:11 ssnmworld

Hi @ssnmworld I met the same situation, and my solution is to add the below codes in the "handler.py" file:

ssh.connect(*args, timeout=options.timeout)
transport = ssh.get_transport()
transport.set_keepalive(60)

I hope It can help you.

gaoxiaodiao avatar Oct 09 '22 09:10 gaoxiaodiao

set websocket_ping_interval greater than 0

x2y2 avatar Nov 06 '23 11:11 x2y2

I have tried all the above suggestions, but nothing worked. Here is the workaround, just execute the below line in your webssh terminal(browser)

while true; do echo ''; sleep 60; done &

fawazahmed0 avatar Nov 07 '23 21:11 fawazahmed0

设置 websocket_ping_interval 大于 0 在哪里设置呀?

OnieMa avatar Nov 09 '23 02:11 OnieMa