Cologica

×
×

Restrict SSH (remote login)

To limit SSH access only to certain IP addresses/ranges, modify /etc/hosts.allow and /etc/hosts.deny. How to: - Login to your server: root@server$ nano /etc/hosts.allow - In the file add below line: sshd: 1.2.3.0/255.255.255.0 (your IP range) sshd: 192.168.1.24 (your IP address) - You can also deny all other IP addresses: root@server$ nano /etc/hosts.deny - Add below line: sshd: ALL Done

Was this article helpful?
Dislike0 Like0
Views: 1576