I have a Linux VM on AWS in EC2 that starts up, performs a task, and then shuts itself down. I am issuing the shutdown command like this:
shutdown -h 5
I have a 5 minute delay to give myself time to ssh into the server and cancel the shutdown if I want to do something with the server.
The problem I have is once I issue the shutdown command, Linux will no longer allow new logins. There doesn't seem to be anything in the man page to allow it to issue a shutdown, but still allow new logins.
Is there a way to issue this shutdown command, but still allow a new ssh login?
shutdownunless you are prepared to stop using the machine immediately until after restart. – chepner Jul 27 '21 at 15:14