Giter VIP home page Giter VIP logo

ksctl's Introduction

ksctl 远程命令工具

此工具用于向远端服务器发送下载文件和shell命令操作,只需配置yaml文件即可

yaml文件实例:

server:
  ip: xx.xxx.xxx.xxx
  port: 22
  account: root
  password: xxxxxx
commands:
  - ls
  - ps
uploads:
  -
    src: ./ksctl.yaml
    dst: /root/ksctl.yaml
  -
    src: ./xxxx
    dst: /root/xxxx
downloads:
  -
    src: /root/ksctl.yaml
    dst: ./ksctl.yaml
  -
    src: ./xxxx
    dst: /root/xxxx
exec:
    name: /xxx/xxx
    exit: true

server为服务器配置

commands命令将会依次运行,每次条指令运行后将返回结果再运行吓一条命令

uploads和downloads为上传和下载文件

exec为想要运行的应用程序,name是绝对路径,exit代表当前程序退出时,远程程序是否退出

使用:

git clone https://github.com/hxoreyer/ksctl
go run ksctl.go -f [yaml文件地址(默认为./ksctl.yaml)]
Release:
ksctl -f [yaml文件地址(默认为./ksctl.yaml)]

可将二进制程序放入环境变量path中

ksctl's People

Contributors

hxoreyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

evayo

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.