sudo vi /etc/ssh/sshd_config
Change `#Port 22` to `Port 2222`
sudo ufw allow 2222/tcp
sudo service ssh restart
OR
sudo systemctl restart ssh
Requires OpenSSH installed
Edit default config file:
sudo nano /etc/ssh/sshd_config
Search for this params and mark as “no”:
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
PermitRootLogin no
Apply settings, then authenticate as your user:
/etc/init.d/ssh reload
Reload service:
sudo systemctl reload sshd