11-12-2021, 06:42 PM
Not sure if TCP wrappers with custom host flies works on modern mobian. The alternative is to control it via the sshd config file:
AllowUsers username@private_static_ip (or ip ranges)
You can also associate ip to authorized_keys file.
As you are using active ufw:
allow from <private_ip> to any port <custom port>
Note that changing default port only protect from dumb bots, it is easy to find sshd associated custom port with nmap or similar tools.
Finally I would set PermitRootLogin to no in sshd config.
This is open to any comment from the community but IMHO it is a reasonable setting, you can sleep peacefully
AllowUsers username@private_static_ip (or ip ranges)
You can also associate ip to authorized_keys file.
As you are using active ufw:
allow from <private_ip> to any port <custom port>
Note that changing default port only protect from dumb bots, it is easy to find sshd associated custom port with nmap or similar tools.
Finally I would set PermitRootLogin to no in sshd config.
This is open to any comment from the community but IMHO it is a reasonable setting, you can sleep peacefully