Git Product home page Git Product logo

login-jumper's Introduction

Login Lumper

License version Codacy Badge Build Status

部署

部署依赖

无pip环境的,请先部署pip(参考命令:sudo easy_install pip)。

  1. 配置pip

sudo mkdir -p ~/.pip/

sudo echo "[global]" > ~/.pip/pip.conf

sudo echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple" >> ~/.pip/pip.conf

sudo pip install --upgrade pip


2.安装虚拟环境

sudo pip install virtualenv

virtualenv --no-site-packages env

source env/bin/activate

部署方式

二种部署方式,可选择pip安装或下载版本源码。

pip安装(推荐)

注:请替换'~/Documents/jump-server/'为安装路径


pip install login-jumper==2.1.5


直接下载源码

下载项目发布版本

下载release版本,解压

安装依赖


sudo pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple


配置

配置redis,修改安装路径login_jumper/conf目录的redis.ini文件


[single]

host = 127.0.0.1

port = 6379

database = 2

password = 123456


修改堡垒机配置,修改安装路径login_jumper/conf目录的conf.ini文件


[Server]

########## 堡垒机IP

jumper_host = 192.168.1.100

########## 堡垒机ssh端口

jumper_port = 22

[Session]

########## 会话超时时长

alive_interval = 20000000000

[System]

########## .bash_profile路径

system_profile = ~/.bash_profile


使用

指定主机参数,运行主程序

请通过-H参数指定需要登录的主机,支持主机名称或IP地址(查询需登录主机的主机名称或IP地址可登录堡垒机,执行jmp -a query)。如需要登录env3主机:


source env/bin/activate

jmp -H env3

注意事项

请在堡垒机设置中开启""Usmshell使用命令行方式"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.