Setting up SSH login on remote server
Note:
This is an export from my old wordpress website, your comments or references might be lost during the migration. Sorry for the inconvenience.
- Install SSH Server
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server
- Configure SSH server on port 1234
sudo sed -ri 's/^Port 22/Port 1234/g' /etc/ssh/sshd_config
- Set maximum login attempts to 3 1
Edit the SSH server config file /etc/ssh/sshd_config
as below:
# Maximum login tries
MaxAuthTries 3
# Allowed users
AllowUsers user1 user2
- Restart ssh service
sudo systemctl restart ssh
-
What’s next
-
Reference
-
http://linux-sys-adm.com/ubuntu-16.04-lts-how-to-install-and-configure-ssh/ ↩