@H_301_1@我在CentOS 6.5计算机上安装了Google-Authenticator,并为某些用户配置了OTP.
编辑/ etc / ssh / sshd_config时,我看到了一个默认注释掉的指令“PermitRootLogin”.
我想设置“PermitRootLogin no”,但仍然只能从本地网络以root身份ssh到机器.
那可能吗?
解决方法
@H_502_11@ 使用/ etc / ssh / sshd_config中的Match配置参数:
- # general config
- PermitRootLogin no
- # the following overrides the general config when conditions are met.
- Match Address 192.168.0.*
- PermitRootLogin yes
请参阅man sshd_config