cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

programming:shell:reboot-via-ssh



How to reboot remote server via ssh

How to reboot remote server via ssh

#!/bin/bash


ssh root@remote-ip "some-command > /dev/null; shutdown -r now &"

ssh root@remote-ip "some-command > /dev/null; shutdown -r now" &

$(ssh root@remote-ip "some-command; shutdown -r now")

uname -a


Refarence




programming/shell/reboot-via-ssh.txt · Last modified: 2021/04/12 by admin

Page Tools