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