Instale o pacote openssh-server no Ubuntu:
sudo tasksel install openssh-server
Ou:
sudo apt install openssh-server
Verifique o status do serviço:
sudo systemctl status ssh.service
ou
sudo service ssh status
ou
sudo systemctl status sshd.service
Para iniciar o serviço, basta substituir status por start nos comandos acima
Permitindo o port 22 a ufw :
sudo ufw allow ssh