restart remote server using unix command code example Example: How to restart Ubuntu via SSH? sudo service ssh restart