1.禁止ROOT经过SSH远程登陆访问
改/etc/ssh/sshd_config文件。找以下的一句
#PermitRootLogin
yes 改成以下的; PermitRootLogin no
注意,要把前面的#号去掉。
2.限制某些用户远程登陆
This account is currently not available.
有时同一个group的用户,某些能够登陆,某些禁止远程登陆,使用vipw查看账号信息(/etc/passwd),账号信息的shell为/sbin/nologin的为禁止远程登陆,如要容许,则改为能够登陆的shell便可,如/bin/bash
|