Linux禁止root用户ssh登录

这么做的目的就是为了安全,因为对外开放了ssh的22端口,只允许应用用户登录,然后应用用户可以通过sudo使用root用户

操作方法:
禁止root远程登录需要编辑/etc/ssh/sshd_config

vim /etc/ssh/sshd_config
找到 PermitRootLogin

改为 PermitRootLogin no

重启 service sshd restart

猜你喜欢

转载自www.cnblogs.com/hupingzhi/p/12296446.html