pssh-rs

Crates.iopssh-rs
lib.rspssh-rs
version0.5.1
sourcesrc
created_at2022-12-03 15:18:52.181746
updated_at2024-10-26 08:20:49.976572
descriptionpssh-rs is a parallel ssh tool written in rust.
homepage
repository
max_upload_size
id729149
size28,235
Yao Zongyou (yaozongyou)

documentation

README

pssh-rs is a parallel ssh tool written in rust.

Example

  1. Generate config file template:
./pssh-rs init

after this command, hosts.toml will be generated at the current directory, change file contents and using --config ./hosts.toml argument to use this file.

  1. run date command on default hosts:
./pssh-rs --config=./hosts.toml --num_threads=10 run 'date'

run date on all nginx hosts

./pssh-rs --config=./hosts.toml --num_threads=10 -s nginx run 'date'
  1. send file to remote hosts:
./pssh-rs --config=./hosts.toml send ./hello.txt /tmp/

Install

just run cargo install pssh-rs to install.

Building

pssh-rs can be built with cargo build --release, or using the following command to build statically:

sudo apt install musl-tools -y
rustup target add x86_64-unknown-linux-musl
cargo build --target=x86_64-unknown-linux-musl --release
Commit count: 0

cargo fmt