原创 root賬戶不能使用密碼只能使用密鑰遠程登陸

打開sshd配置文件  vim  /etc/ssh/sshd_config  在最後面增加一行 :PermitRootLogin without-password保存配置文件後重啓sshd服務service  sshd  restart

原创 root賬戶不允許遠程登陸

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