I sometimes mistakenly shutdown the remote machine by using sudo init 0, so I wrote something like in one of my rc files:alias sudo='sudo 'if [ $SSH_CLIENT ]; then  alias init 'echo Never use init when ssh'fiHowever although the rc files is executed, init still runs /sbin/init rather than the alias. And I don't like to add a global wrapper script into /usr/local/bin. Is it possible to disable sudo init 0 then? Or I have to ask the administrator for help?
Is there any way to disable shutdowning remote machine?
sudo;root;shutdown;su;init
Redefine sudo as a function:sudo() if [ $1 = init ] && [ -n $SSH_CLIENT ]; then  echo >&2 Never use init when ssh  return 1else  command sudo $@fiIf you want your aliases expanded after sudo, you can still add aalias sudo='sudo 'it will still call our sudo function.