Thursday, August 11, 2011

How to Reboot Linux Machines Remotely


Reboot Linux Machines Remotely :




If you don’t have direct physical access to your Linux box but have the root password, you can easily remotely reboot Linux by executing this simple reboot command. Note that while you can ssh onto the remote Linux host just by itself, you can also send remote commands via ssh as well and this is what we’ll use to execute the restart. This is great if you don’t have direct physical access to your host (or are too lazy to get up out of your seat) but have administrative root privileges to execute a remote shutdown. The command is simple but requires ssh (secure shell) service which should be installed and running standard on just about any Linux distribution. You’ll need to know your Linux machine’s IP address or machine name just as if you were to remotely login to that machine, but instead you’ll execute a remote reboot command.


 From any Linux terminal shell, execute:


% ssh root@remote-linux-host reboot


or


% ssh root@10.9.73.26 reboot

 

Then the host will reboot automatically, and if there are users still logged in they will be warned as the machine shuts down and powers back up gracefully.


Example :


1.  Two Linux boxes with different IP. Now I am going to reboot 10.9.73.16 from 10.9.73.20




2. Hooray, box is rebooting now.



Thanks for reading ... :)

No comments:

Post a Comment