Ubuntu display warning before shutdown over ssh

remote-accesssshUbuntu

Ok I admit it…

I stupidly shutdown my remote server via ssh instead of restarting it like I wanted to do 🙁

To prevent me doing a silly again, is there a way to display a warning / confirmation on a shutdown command? (like "Are you sure you want to shut down this server?" yes/no )

OR, can I not allow shutting down (but not restarting because I still might need to do that from time to time) over ssh?

Best Answer

Try molly-guard:

protects machines from accidental shutdowns/reboots
Related Topic