56
23
I have a ssh connection to a machine which gets disconnected by that machine after 30 minutes of no user input. However, if I start something like top
, the connection stays alive.
Since this is a client's machine, I can not reconfigure that machine's SSH server. So I am looking for a way to automatically detect idleness and start something like top
. Kind of a "screensaver" for Bash.
I know that I can do that with screen
, but unfortunately screen
is not installed, and I can not install software. So I need to use what Bash offers.
To make it clear: I am looking for a solution that I start once after logging in, and then I want to use that terminal, walk away, come back two hours later and continue working, without typing anything before walking away. Also, I am not looking to tunnel stuff (for that I recommend the great tool sshuttle)
Any ideas?
Possible duplicate of How to reliably keep an SSH tunnel open?
– Murmel – 2018-01-15T22:30:38.597Just a quick note to make clear screen and Keepalive are not the same thing: for instance, if either ssh client or server gest disconnected, your ssh session will be terminated even if you have KeepAlive on, while a screen shell wouldn't be terminated. – MariusMatutiae – 2014-01-10T11:50:24.710