SSH security best practice

Primary tabs

SSH Security Best Practices

On file /etc/ssh/sshd_config:

  1. Disable Root Logins

Best: PermitRootLogin no
Good: PermitRootLogin without-password (requires PubkeyAuthentication yes)

  1. Limit user Logins
AllowUsers somusername1 someusername2
  1. Disable Protocol 1
Protocol 2
  1. Use a Non-Standard Port
Port 2345
  1. Use Public/Private Keys for Authentication
PubkeyAuthentication yes

Disable password authentication forcing use of keys:

PasswordAuthentication no

Source: https://wiki.centos.org/HowTos/Network/SecuringSSH

Tags 
ssh


QR Code for https://setupexample.com/ssh-security-best-practice