How to secure SSH in your server ?
May 15th, 2010
0 Comments
1) Set a very strong password, keep it in your mind but dont write in somewhere.
2) Disable direct root login
emacs /etc/ssh/sshd_config
Search for
#PermitRootLogin yes
Set it as
PermitRootLogin no
Restart ssh
service sshd restart
3) Limit user login
AllowUsers username
Restart ssh
service sshd restart
4) Disable protocol 1
ssh use 2 protocols, protocol 1 is old and less secure, so enable protocol 2
#Protocol 2 1
Protocol 2
5) Change ssh port to non standard port
emacs /etc/ssh/sshd_config
Port 123 #change_me
Restart ssh
service sshd restart
Note: If you are running iptables, then dont forget to open that port in iptables before you change it in sshd_config
Related posts:
- How to open and close port in iptables ?
- Setup and Secure Plesk Server
- Configuring range of ips in Linux,Centos,fedora core, red hat
- Enableing passive mode in FTP server with CSF firewall
- Changing mail server ip in cpanel
- five important tips to secure your wordpress blog
- How to catch spammer or Scammer in Cpanel server?
- ip_conntrack table is full and dropping packets
















No Comment to “How to secure SSH in your server ?”