📅  最后修改于: 2022-03-11 14:51:28.410000             🧑  作者: Mango
First check the set of rules of your default UFW firewall:
sudo ufw status numbered
Now check the default port of your SSH:
grep -i port /etc/ssh/sshd_config
Now if UFW is not allowing SSH port then please add it in UFW rules:
sudo ufw allows ssh_port_number (type your SSH port default number here)
Now restart your SSH:
sudo systemctl start ssh