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