Linux > Server Security & Hardening

Secure your SSH

(1/1)

rohitj:
Secure SSH in your Server

Please change the below configurations in ssh configuration file (/etc/ssh/sshd_config) order to secure your SSH.

1) Only Use SSH Protocol 2


--- Code: ---Protocol 2
--- End code ---

SSH protocol version 1 (SSH-1) has man-in-the-middle attacks problems and security vulnerabilities.

2) Only allow particular users


--- Code: ---AllowUsers user1 user2
--- End code ---

3) Configure Idle Log Out Timeout Interval


--- Code: ---ClientAliveInterval 300
ClientAliveCountMax 0
--- End code ---

4) Disable .rhosts Files


--- Code: ---IgnoreRhosts yes
--- End code ---

5)  Disable Host-Based Authentication


--- Code: ---HostbasedAuthentication no
--- End code ---

6) Disable root Login via SSH


--- Code: ---PermitRootLogin no
--- End code ---

7) Change SSH Port and Limit IP Binding


--- Code: ---Port 300
ListenAddress 192.168.*.*
ListenAddress 202.54.*.*
--- End code ---

Done   :D

Navigation

[0] Message Index

Go to full version