6.1.9 Disable SSH root Login - Check if PermitRootLogin is set to no and not commented for the server.

Information

Level: 1

Solution

Edit the /etc/ssh/sshd_config file to set the parameter as follows-

awk '/^PermitRootLogin/ { $2 = 'no' } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new

/usr/bin/mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config

/usr/sbin/pkgchk -f -n -p /etc/ssh/sshd_config

/usr/sbin/svcadm restart svc:/network/ssh

See Also

https://benchmarks.cisecurity.org/tools2/solaris/CIS_Oracle_Solaris_10_Benchmark_v5.2.0.pdf

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-17

Plugin: Unix

Control ID: f00f8978179e0b7830989e3b5b310b26f1f8ba25306e6bfd6ae8f07f9a805e75