PasswordAuthentication no— disables password auth in favour of key-based authentication.PermitRootLogin no— prevents direct root login via SSH.AllowUsers/AllowGroups— restricts SSH access to specific users or groups.
Ubuntu uses UFW (Uncomplicated Firewall) by default. When UFW is enabled it blocks all inbound connections — including SSH — unless explicitly allowed.
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)