In this write-up, we will learn different methods to restart the Raspberry Pi remotely or by sitting far apart from the device’s hardware.
How to restart/reboot the Raspberry Pi remotely
There are different methods by which we can remotely control the Raspberry Pi and restart the Raspberry Pi. These methods are:
- By using the SSH connection
- By using the VNC
- By using the smartphone
How to restart the Raspberry Pi remotely through SSH
The SSH (Secure Shell) is a communication protocol used to communicate with another computer machine by using the IP address of that machine. To shutdown Raspberry Pi remotely, we will connect the Raspberry Pi with our machine by using its IP address, which is 192.168.18.218 (the IP address of your machine would be different). To connect with the machine, we will use the SSH command (make sure the ssh package is installed on both machines):
For the first time, it will ask you for confirmation to continue the connection; type “yes”, then the machine will be added to the list of the hosted computers, and next time, it will not ask for confirmation. Then it will ask for the password of the machine of the given IP address:
The connection has successfully completed:
To confirm the connection, we will use the “ls” command to list down the contents of the machine:
This means we have accessed the Raspberry Pi, now we will run the reboot command to reboot the Raspberry Pi:
The Raspberry Pi has been restarted and meanwhile the connection of our machine with it is closed:
How to restart the Raspberry Pi remotely by using the VNC
VNC (Virtual Network Control) is software used to control the devices remotely, so if the VNC is installed and enabled on both devices, we can connect with the remote device. Open the VNC and enter the IP address of the remote machine:
A dialog box will appear, type the user name and password of the concerned machine and click on the “OK” button:
The display of the connected machine will appear on the screen:
You can either reboot the system by using its terminal or by clicking on the top left corner on the icon of Raspberry Pi:
In the drop-down menu click on the “Shutdown..” and the box will appear with the “Shutdown Options”, click on the “Reboot”:
How to restart the Raspberry Pi remotely through smartphone
The RaspController is an Android application used to control and manage the Raspberry Pi device from any Android mobile device. We have already installed the RaspController on the Android mobile, open the application, type the “Device name”, “Host / IP address”, “Username”, “Password” and then click on the save icon below:
Now connect the remote machine using IP address:
A menu will be displayed with different options:
Scroll down the options and you will get the option of the “Reboot Device” click on it:
A confirmation message will be appears to click on the “Continue” button and the Raspberry Pi will be restarted:
Conclusion
The Raspberry Pi foundation has released different models of single-board computers for different applications. These models of Raspberry Pi can be accessed remotely by different methods and can manage the power and other options of the board. In this write-up, different methods of restarting the Raspberry Pi remotely have been explained.