A.) ssh -t user@hostname 'sudo shutdown -P now'
In the above example
-t : forces the allocation of a tty for the command.
-P : stands for power off.
-r : to reboot.
-h : to halt.
Also all the shutdown arguments can be passed along. To know more about shutdown options run command.
shutdown --help
No comments:
Post a Comment