User Tools

Site Tools


computers:ssh_security

This is an old revision of the document!


SSH security

Limit by user

Only allow required users to login.

Mac: in “System Preferences/Sharing/Remote Login”, choose users in the “Allow access for:” box.

Limit by IP address

# /etc/hosts.allow
# allow Academia Sinica IPs (140.109.*.*)
# allow intranet-ethernet IPs (192.168.1.*)
# allow intranet-wireless IPs (10.0.1.*)
sshd: 140.109., 192.168.1., 10.0.1. : allow
# /etc/hosts.deny
# deny from all
sshd: ALL

Check log files

Mac:

more /var/log/secure.log

Ubuntu:

more /var/log/auth.log
computers/ssh_security.1317018657.txt.gz · Last modified: 2011/09/26 14:30 by chkuo