Configure Auto-Shutdown (SSH Connections)
Use the Auto-Shutdown feature to prevent idle runtime.
Overview
Auto-Shutdown on Linux machines can not detect activity when using an SSH connection. Please use the script below if you'd like to prevent auto-shutdown on your Linux Ubuntu machine while connecting via SSH.
Setup
Download the script from this link.
- Open a terminal.
- Change directory to root (
cd /
) - Execute
sudo tar xzf /home/paperspace/idle_shutdown.tgz
(substitute with the correct path to the downloaded tarball)
If you're accessing from a Linux Desktop VM, please complete this step:
Download and install the xprintidle
utility:
sudo apt-get install xprintidle
You modify the IDLE time of the machine by accessing the configuration file sudo nano etc/default/idle_shutdown
Examples
Shutdown after one hour:
IDLE_TIME=1
Shutdown after one week:
IDLE_TIME=168
- Enable the service with:
systemctl enable idle_shutdown.service
- Start it:
systemctl start idle_shutdown.service
The Auto-Shutdown script will now automatically start on boot. If you don't want to shut down, edit the file in/etc/default
and leave it blank or disable it via systemd:
sudo systemctl disable idle_shutdown.service
sudo systemctl stop idle_shutdown.service
Any changes will require a restart of the service: systemctl restart idle_shutdown.service
Note: Auto-Shutdown works by detecting changes to the desktop or terminal. If you're connected to the terminal or desktop, and there are no inputs detected, the machine will assume it is idle.