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