Get the latest tech news
Keeping SSH sessions alive with systemd-inhibit
Lets learn how to use systemd-inhibit to block systems idle states.
After the typical timeout around 30 mins the system goes to sleep which drops the session and forces me to send another wol and reconnect via ssh and then reattach to tmux. Since we aren’t hand jamming the command each time we want to inhibit the power policy, we can take advantage of some niceties the cli provides. After some consideration, I determined running the commands in an incorrect order or sequence after many sessions could leave you with trying to kill a PID that isn’t what you want.
Or read this on Hacker News