OpenSSH server on VPS is the first and main method of access to Linux and FreeBSD server; by default, it is configured quite securely and allows all users to connect to the this system.
In the Debian distribution, the root user can only connect using the keys and cannot connect using the password. The configuration file itself may contain settings that may be useful to you depending on the situation. Keys DennyUsers and AllowUsers – Allows you to restrict users and IP from which they can connect. For example, these lines:
Only root, johnn, anny users can connect. In addition, the root user can only connect with IP 184.108.40.206 and anyy from the 220.127.116.11/24 subnet.
Key Match – Let’s redefine some settings and global restrictions for connections that fall under the filter.
Match Address 18.104.22.168,22.214.171.124 Host vps12.hostry.com
For connections from addresses 126.96.36.199,188.8.131.52 and from the node vps12.hostry.com will allow you to use a password
Match User John Address 172.16.1.*