Ubuntu:SSH服务

来自WHY42

OpenSSH

sudo apt install openssh-server
sudo systemctl is-enabled ssh

如果要允许root登录,需要修改/ etc/ssh/sshd_config

  • PermitRootLogin = yes

UFW

sudo ufw enable
sudo ufw allow ssh
sudo ufw reload
sudo ufw status verbose