command
Version:
v0.0.0-...-50172b1
Opens a new window with list of versions in this module.
Published: Oct 13, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
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
¶
* 批量远程执行ssh命令
*
* create time 2018-04-05
* update time 2021-09-16
Source Files
¶
Click to show internal directories.
Click to hide internal directories.