zoukankan      html  css  js  c++  java
  • Linux给普通用户增加ssh权限

    //1,创建用户 
    useradd name
    
    //2,修改密码
    passwd name
    
    //3,修改ssh配置文件,在最后一行添加AllowUsers name
    vi /etc/ssh/sshd_config
    
    //4,重启ssh服务
    service sshd restart
    
    可以在/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)
  • 相关阅读:
    省选知识点
    寒假练习
    水题欢乐赛-套路
    2019年12月(2)
    洛谷P1347 排序
    Aizu
    2019年12月(1)
    【CSP2019】
    联系博主
    UVA1420 Priest John's Busiest Day【贪心】
  • 原文地址:https://www.cnblogs.com/toward-the-sun/p/7171497.html
Copyright © 2011-2022 走看看