Order a VPS from OVH Optionnaly assign a DNS entry to the VPS IP Address
Open an ssh session to remote vps server
ssh [email protected]
Add user
sudo adduser patrick
sudo usermod -aG sudo,users username
Test sudo access
su - username
sudo ls -la /root
Exit remote machine:
exit
exit
On local machine:
ssh-keygen -t rsa -b 4096 -f .ssh/[email protected]
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
Test access:
ssh -i .ssh/[email protected] [email protected]
Disable ssh root access on remote machine:
sudo vi /etc/ssh/sshd_config
LoginGraceTime 120 PermitRootLogin no StrictModes yes
sudo systemctl restart sshd
Install Failban
sudo apt install fail2ban
Disable password auth on ssh for username users but one