shylock

linux系统安装好,建立普通用户后,普通用户不一定能通过ssh连接到服务器

可以在/etc/ssh/sshd_config中增加AllowUsers:username

(可以多个,空格分开)给普通用户增加ssh权限

也可以设置允许和拒绝ssh的用户/用户组:

DenyUsers:username,DenyGroups:groupname

 

优先级如下:

DenyUsers:username

AllowUsers:username

DenyGroups:groupname

AllowGroups:groupname

在给普通用户设立ssh权限后,即可将root ssh权限禁用,增加安全性

(也可以在sshd_config中将PermitRootLogin 选项修改为:PermitRootLogin no)

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2021-09-10
  • 2021-05-31
  • 2022-12-23
  • 2021-12-06
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案