Giter Club home page Giter Club logo

fortress's Introduction

简介

在本机和服务器之间做一些交互,比如:远程执行命令、上传文件、下载文件

安装

下载

~ go get github.com/ooiill/fortress

拷贝配置文件样例

~ cp $GOPATH/src/github.com/ooiill/fortress/fortress.json ~/.fortress.json

编译安装

~ go install github.com/ooiill/fortress

运行

➜  ~ fortress -h                   // 打印参数列表
➜  ~ fortress                      // 进入交互式执行
➜  ~ fortress --index=1,2,3
➜  ~ fortress --mode=1             // 半交互式
➜  ~ fortress --index=1 --mode=1   // 自动执行,后面是数字与交互式菜单索引保持一致

配置项作用

  1. fortress.json > host 定义相关主机信息;

  2. fortress.json > fortress 定义相关跳板任务;

  3. 请将本机 ~/.ssh/id_rsa.pub 追加到远程主机的 ~/.ssh/authorized_keys 文件中来避免交互输入密码;

  4. fortress.json > hosts > password 若被设置,将使用 sshpass 软件执行命令,可用于替代上一条事项(前提是本机已安装该软件);

  5. fortress.json > fortress > type 支持 sshsyncnormal(缺省),具体配置项见示例配置文件;

Tips: 如果使用 windows 系统建议使用 git bash 执行;

样例

操作台

作者

[email protected]

fortress's People

Contributors

ooiill avatar

Stargazers

 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.