restart ssh ubuntu code example Example 1: ssh restart ubuntu sudo service ssh restart Example 2: sudo service ssh start sudo service ssh start