CentOS7下配置使用JumpServer堡垒机

Linux文章/教程评论707阅读模式

首次wbe登录,https://ip:80,默认账号密码:admin,admin;这里自定义密码修改:admin@123
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机

用户管理项
创建系统角色

CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
创建用户
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
创建用户组
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

资产管理项
创建资产

左侧是资产树,右击“Default”可以新建、删除、更改树节点,授权资产也是以节点方式组织的,右侧是属于该节点下的资产。
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

创建网域

网域功能是为了解决部分环境(如:混合云)无法直接连接而新增的功能,原理是通过网关服务器进行跳转登录。JMS => 网域网关 => 目标资产。
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

创建系统用户

系统用户 是JumpServer 登录资产时使用的账号,如 root `ssh root@host`,而不是使用该用户名登录资产(ssh admin@host)`;
特权用户 是资产已存在的, 并且拥有 高级权限 的系统用户, JumpServer 使用该用户来 `推送系统用户`、`获取资产硬件信息` 等;
普通用户 可以在资产上预先存在,也可以由 特权用户 来自动创建。
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
特权用户 是资产已存在的, 并且拥有 高级权限 的系统用户, 如 root 或 拥有 `NOPASSWD: ALL` sudo 权限的用户。 JumpServer 使用该用户来 `推送系统用户`、`获取资产硬件信息` 等。
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

命令过滤

系统用户支持绑定多个命令过滤器实现禁止输入某些命令的效果;过滤器中可配置多个规则,在使用该系统用户连接资产时,输入的命令按照过滤器中配置的规则优先级生效。
例:首先匹配到的规则是“允许”,则该命令执行,首先匹配到的规则为“禁止”,则禁止该命令执行;如果最后未匹配到规则,则允许执行。
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
权限管理
创建资产授权规则
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
测试命令过滤规则
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机
去除web终端水印
CentOS7下配置使用JumpServer堡垒机
CentOS7下配置使用JumpServer堡垒机文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

重置Web登录密码

如果忘了密码或者密码过期,可以点击找回密码通过邮件找回
如果无法通过邮件找回,可以通过admin控制台重置
如果是admin用户,可以通过JumpServer 宿主机上重置文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

[root@JumpServer ~]# docker exec -it jms_core /bin/bash
root@44c9b78172ce:/opt/jumpserver# cd /opt/jumpserver/apps
root@44c9b78172ce:/opt/jumpserver/apps# python manage.py shell
Python 3.8.16 (default, Dec 21 2022, 09:26:59) 
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from users.models import User
In [2]: u = User.objects.get(username='admin')
In [3]: u.reset_password('admin@456')
In [4]: u.save()
In [5]: exit
root@44c9b78172ce:/opt/jumpserver/apps# exit
exit
# admin 为你要修改的账户名称,password 为你要修改的密码

登录频繁账号被锁定

找管理员重置,管理员可以在对应用户的个人页面重置
或者通过下面的 shell 解决文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

docker exec -it jms_core /bin/bash
cd /opt/jumpserver/apps
python manage.py shell
from django.core.cache import cache
cache.delete_pattern('_LOGIN_BLOCK_*')
cache.delete_pattern('_LOGIN_LIMIT_*')

其他问题

资产测试可连接性、更新硬件信息 报 Permission denied 或者 Authentication failure
一般都是管理用户账户密码不正确
资产测试可连接性、更新硬件信息 报 /usr/bin/python: not found
在一般是资产 python 未安装或者 python 异常,一般出现在 ubuntu 资产上
系统用户测试资产可连接性错误
确定系统用户是否正确,如果系统用户使用了自动推送,确保管理用户正确
系统用户设置为 root 的情况下,请关闭自动推送,并输入正确的 root 密码
Connect websocket server error
一般情况下 nginx 未配置 websocket 导致,根据反向代理文档进行修改后重启 nginx 即可
提示 timeout
# 手动 ssh 登录提示 timeout 的那台服务器
vi /etc/ssh/sshd_config
UseDNS no
# 重启 JumpServer 服务器的 docker
systemctl restart docker
docker restart jms_koko

至此,CentOS7下配置使用JumpServer 堡垒机的基本功能已完成。文章源自爱尚资源教程网-https://www.23jcw.net/4347.html 文章源自爱尚资源教程网-https://www.23jcw.net/4347.html

相关文章
版权声明:文章图片资源来源于网络,如有侵权,请留言删除!!!
  • 温馨提示:如遇到资源下载不了,或者文章没有解决你的问题的,可以联系我们帮你处理!!!
  • 转载请务必保留本文链接:https://www.23jcw.net/4347.html

发表评论