Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
1. Install
sudo apt-get install openssh-server
2. Configure
vim /etc/ssh/sshd_config
#port 22 changed to port 22
#PermitRootLogin prohibit-password 改为 PermitRootLogin yes
3. Modify the firewall rule
sudo ufw allow 22/tcp