UltraDebug

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: A C D R G Y M Z X S P
公益项目,接受捐赠
查看: 2232|回复: 0
收起左侧

[其它] 【开源】远端命令工具

[复制链接]
qingjue

主题

0

回帖

UD

版主

UID
5
积分
70
注册时间
2021-12-21
最后登录
1970-1-1
2022-7-10 23:37:37 | 显示全部楼层 |阅读模式
补充一下,如果有项目需要频繁上传文件并运行来测试的话,这种就要比shell方便很多
shell适合做流水型命令,这个就比较适合做循环的了

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

yaml文件:

[AppleScript] 纯文本查看 复制代码
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
SyntaxHighlighter Copyright 2004-2013 Alex Gorbatchev.
server为服务器配置
commands命令将会依次运行,每次条指令运行后将返回结果再运行下一条命令
uploads和downloads为上传和下载文件
exec为想要运行的应用程序,name是绝对路径,exit代表当前程序退出时,远程程序是否退出


使用:

[AppleScript] 纯文本查看 复制代码
git clone [url=https://github.com/hxoreyer/ksctl]https://github.com/hxoreyer/ksctl[/url]
go run ksctl.go -f [yaml文件地址(默认为./ksctl.yaml)]
SyntaxHighlighter Copyright 2004-2013 Alex Gorbatchev.
Release:
[AppleScript] 纯文本查看 复制代码
ksctl -f [yaml文件地址(默认为./ksctl.yaml)]
SyntaxHighlighter Copyright 2004-2013 Alex Gorbatchev.
可将二进制程序放入环境变量path中

项目地址:https://github.com/hxoreyer/ksctl
UltraDebug免责声明
✅以上内容均来自网友转发或原创,如存在侵权请发送到站方邮件9003554@qq.com处理。
✅The above content is forwarded or original by netizens. If there is infringement, please send the email to the destination 9003554@qq.com handle.
回复 打印

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|站点地图|UltraDebug ( 滇ICP备2022002049号-2 滇公网安备 53032102000034号)

GMT+8, 2025-6-16 19:08 , Processed in 0.034134 second(s), 10 queries , Redis On.

Powered by Discuz X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表