I'm trying to run a command that might take 1+ hours and I've tried adding
while sleep 300; do echo "1"; done
so that it doesn't disconnect me for being idle and it worked.
But it still disconnects after sometimes for another reason it says Connection to *.*.*.*
closed by remote host.
I guess its just a default time limit or something I don't really know?
Is there a way to increase that time or just make it never disconnects?
If not is there a way to keep that command running even after closing the ssh connection ?