rssh

command
v0.0.0-...-50172b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

README

批量远程执行 ssh命令/scp上传文件

下载程序

帮助信息

[username@localhost ~]$ ./rssh -help
Usage of ./rssh:
  -c string
    	config file for yaml list (default "./rssh.yml")
  -e string
    	exec shell command
  -example
    	create a sample configuration
  -f string
    	upload file, example /etc/hosts:/tmp/hosts
  -g string
    	exec group name

执行命令

[username@localhost ~]$ ./rssh -host website -e 'df -h /'
Password:
---

> test-host-1
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 5.9G 41G 13% /

> test-host-2
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 5.9G 41G 13% /

---
time: 102.160669ms

上传文件

[username@localhost ~]$ ./rssh -host website -f '/etc/hosts:/home/user/hosts'
Password:
---
/etc/hosts 192.168.100.202:22 -> /home/user/hosts OK
/etc/hosts 192.168.100.201:22 -> /home/user/hosts OK
---
time: 84.508462ms

Documentation

Overview

* 批量远程执行ssh命令 * * create time 2018-04-05 * update time 2021-09-16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL