Admin-Ahead Community

Linux => Server Security & Hardening => Topic started by: rohitj on December 28, 2013, 10:40:05 pm

Title: Secure your SSH
Post by: rohitj on December 28, 2013, 10:40:05 pm
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: [Select]
Protocol 2
SSH protocol version 1 (SSH-1) has man-in-the-middle attacks problems and security vulnerabilities.

2) Only allow particular users

Code: [Select]
AllowUsers user1 user2
3) Configure Idle Log Out Timeout Interval

Code: [Select]
ClientAliveInterval 300
ClientAliveCountMax 0

4) Disable .rhosts Files

Code: [Select]
IgnoreRhosts yes
5)  Disable Host-Based Authentication

Code: [Select]
HostbasedAuthentication no
6) Disable root Login via SSH

Code: [Select]
PermitRootLogin no
7) Change SSH Port and Limit IP Binding

Code: [Select]
Port 300
ListenAddress 192.168.*.*
ListenAddress 202.54.*.*

Done   :D