You can reboot a Linux server from an SSH session if you have root access or permission to run the reboot command with sudo.
Before you reboot
A reboot interrupts hosted services and disconnects active sessions. Arrange a suitable maintenance window, save your work and check that any important tasks have finished.
Confirm that you are connected to the intended server:
hostnameNot every configuration change requires a full reboot. Follow the relevant service or update instructions when deciding whether a restart is needed. Ensure that you have provider-console access or a way to request assistance if SSH does not return.
Reboot the server
In the SSH session, run:
sudo rebootEnter your password if prompted. The command requests a server restart; the SSH connection will normally close as the server shuts down. You do not need to run it again because the session disconnects.
Reconnect and check services
Wait for the server to start, then reconnect using SSH. Restart time depends on the server and its configuration.
Check uptime:
uptimeThen check that the websites, databases and other services you administer are available. A successful SSH connection does not establish that every hosted service has recovered.
If the server does not return, use the provider console or contact support to investigate its boot state.