Coder Social home page Coder Social logo

jump_login's Introduction

跳板机自动登录

描述: 获取动态密码(例如谷歌身份验证),登录跳板机 (谷歌动态令牌 ssh expect)

第一步 配置token实现动态密码 Go服务

  1. 服务介绍
    • 前缀+动态密码+后缀组成 前后缀都可为空
    • 针对一下不同场景:
      • 固定密码+动态密码 例如:rwx324343
      • 动态密码+固定密码 例如:324343xwr
      • 以及 固定密码+动态+固定密码 例如:rwx543334xwr
  2. token/conf/conf 配置维护
#前缀
PREFIX=rwx(替换 可为空)
#后缀
SUFFIX=xwr(替换 可为空)
#动态密码 秘钥
SECRET=renwoxing68
  1. token包对应 code.go 如修改code.go 重新构建

第二步 配置expect脚本

  1. sh/sv_test.sh 对应替换成个人的信息
  2. 如果所需的服务是 先输入密码 成功后输入动态口令,可在脚本中自行添加一列
  3. 本脚本中还包括登录跳板机以后相关的操作,如不需要可遗弃
  4. 如需配置跳板机登录后跳转其他服务可配置多个sv_test.sh脚本

第三步 执行

  1. expect 绝对路径/jump_login/sh/sv_test.sh
  2. 添加别名执行
#linux mac
~/.zshrc  或 ~/.bashrc 中增加下面一行
source  正确路径/jump_login/sh/.alias_login

jump_login's People

Contributors

renwoxing68 avatar

Stargazers

 avatar  avatar Han avatar

Watchers

 avatar

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.