Secure NX server by editing sshd_config, hosts.deny and hosts.deny








1. /etc/ssh/sshd_config
# /etc/ssh/sshd_config

AllowUsers wilson@127.0.0.1

AllowUsers wilson@192.168.*

AllowUsers wilson@123.222.111.1

# Note: to enable nx connection,
#   you have to allow user nx to access via SSH

AllowUsers nx@127.0.0.1

AllowUsers nx@123.222.111.1


2. /etc/hosts.deny
ALL: ALL


3. /etc/hosts.allow
# allow localhost
ALL: 127.0 [::1]

# allow localhost access SSHD
sshd: 127.0.0.1

# allow LAN access SSHD
sshd: 192.168.

# allow wilson access SSHD
sshd: 123.222.111.1



SEE ALSO
[1]
[2:  HOWTO - Limiting Access to TCP-wrapped Services with hosts.allow ]
[3: TCP Wrappers]
[4: hosts.deny]


No comments:

Post a Comment