有時爲了特殊需求,只允許普通賬戶登陸Linux,而不允許root賬戶登陸,而普通賬戶登陸後,然後再su 到root下是可以的。打開sshd的配置文件
vim /etc/ssh/sshd_config 加入一行:
PermitRootLogin without-password
重啓sshd服務: service sshd restart
有時爲了特殊需求,只允許普通賬戶登陸Linux,而不允許root賬戶登陸,而普通賬戶登陸後,然後再su 到root下是可以的。打開sshd的配置文件
vim /etc/ssh/sshd_config 加入一行:
PermitRootLogin without-password
重啓sshd服務: service sshd restart