I have an Ubuntu server in AWS EC2, and created a service to shut down automatically after three hours, in case I forgot to. I added a
shutdown -h 180 command to a service that is started on boot. Since I didn't want to wait three hours I decided to test this by changing the 180 minutes to 3 minutes, and it worked great! Three minutes in, the server shutdown and my EC2 instance was stopped.
Unfortunately, now I'm unable to SSH into the server anymore. Now that it schedules this shutdown for three minutes after startup when I try to SSH it gives me the message
System is going down. Connection closed... which I assume is because the shutdown is imminent.
Is there any way to fix this mistake when I can't login anymore?