SSH Security Reinforcement

SSH is a software package that enables secure system administration and file transfers over insecure networks. It is used in nearly every data center and in every large enterprise.

$ sudo vim /etc/ssh/sshd_config
$ sudo vim /var/log/secure
Port 65531    # ssh port to modify the default 22
ListenAddress 192.168.1.X    # ssh allows the IP address of the login
PermitRootLogin no    # root prohibited via ssh
AllowUsers test@192.168.1.*    # allows the user to test the IP 192.168.1. * Client Access Login
Compression no
Compression delayed
LoginGraceTime 6
MaxAuthTries 3
MaxSessions 6
PrintLastLog yes
ClientAliveInterval 900
ClientAliveCountMax 0
$ sudo ls -l /etc/ssh/*key
$ sudo chmod 0600 /etc/ssh/*key
$ sudo grep -i hostkey /etc/ssh/sshd_config
$ sudo ls -l /etc/ssh/*pub
$ sudo chmod 0644 /etc/ssh/*pub
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus