first give: 'sudo ufw enable'
then check UFW status by 'sudo ufw status'
if its ACTIVE then 'sudo ufw allow openssh'
give 'sudo ufw status' again to check OpenSSH is enabled or not,
enabled UFW rules will be listed there along with Active or not status