User Tools

Site Tools


system:ssh:security

This is an old revision of the document!


Check for password attempts: ``` # grep “Failed password” /var/log/auth.log ``` and ``` cat /var/log/auth.log ```

Restrict IP address (whitelist): ``` sudo nano /etc/hosts.allow ``` and add the following lines to allow the whitelisted IP blocks to your public SSH. ``` sshd: 192.168.x.x/32, … ```

Also, Open up /etc/hosts.allow file using your favorite text editor: ``` sudo nano /etc/hosts.deny ``` and add the following lines to deny all SSH connections to your public SSH port

``` sshd: ALL ```

https://www.tecmint.com/find-failed-ssh-login-attempts-in-linux/#:~:text=Each%20attempt%20to%20login%20to,cat%20command%20or%20grep%20command.

https://cloudcone.com/docs/article/how-to-restrict-ssh-access-only-to-specific-ips/

system/ssh/security.1595787774.txt.gz · Last modified: by ltsover9000