SSH Hardening

If you use Linux you most likely use SSH. SSH allows you to make connections without a password.

Enable passwordless Authentication

PubkeyAuthentication yes

Disable Password Authentication

PasswordAuthentication no

Disable Empty Passwords

Some user accounts are created without passwords, administrators of linux machines can create standard users without passwords. SSH does not prevent empty passwords from being allowed.

PermitEmptyPasswords no

Disable Root Login

PermitRootLogin no

Defult SSH Port

Port 12345

Allow Users and Groups**

Disable X11 Forwarding

X11 Forwarding allows anyone to tunnel GUI applications with SSH. You probably dont want that.

Disable Gateway Ports

Disable PermitUserEnvironment

Disable Weak Cryptographic Algorithims

You can test support algorithims using nmap

Regenerate Host Keys

Disable Host Keys

Disable Small Diffie-Hellman Key Sizes

Disable SSHv1

Last updated

Was this helpful?