Run the same command on many remote hosts concurrently over SSH (with optional non-interactive sudo), while streaming output and producing a final summary.
curl -fsSL https://raw.githubusercontent.com/kevin197011/kkfly/main/install.sh | bashgo build -o kkfly ./cmd/kkflyCopy and edit:
kkfly.yml(default config file)- or use
configs/kkfly.ymlas a template
Minimum required fields:
userprivate_key_pathporthostsconcurrencycommand
Example (kkfly.yml):
user: ubuntu
private_key_path: ~/.ssh/id_ed25519
port: 22
concurrency: 20
sudo: true
connect_timeout_seconds: 10
command_timeout_seconds: 900
max_output_bytes_per_stream: 262144
strict_host_key_checking: false
command: |
echo hello
hosts:
- 1.2.3.4
- example.comFields:
user(required): SSH username.private_key_path(required unlessprivate_key_contentis set): Path to the SSH private key file.private_key_content(optional): Inline private key content (takes precedence overprivate_key_path).port(optional, default22): SSH port.hosts(required): List of hosts (IP or hostname).concurrency(required,>= 1): Max number of hosts to run in parallel.command(required): Shell command to run remotely. Runs viabash -lc.sudo(optional, defaultfalse): Iftrue, runs remote command viasudo -n bash -lc ...(non-interactive).connect_timeout_seconds(optional, default10): SSH connect timeout.command_timeout_seconds(optional, default900): Per-host command timeout.max_output_bytes_per_stream(optional, default262144): Max bytes captured per stream (stdout/stderr) per host.known_hosts_path(optional): Path to aknown_hostsfile to use for host key verification.strict_host_key_checking(optional, defaulttrue): Iffalse, do not block on unknown host keys (insecure; useful for fresh environments).disable_stdout_stderr_print(optional, defaultfalse): Iftrue, suppress streamingOUT/ERRlines in the terminal (still captured in JSON if enabled).
./kkflyPrint version:
./kkfly --versionWrite a JSON report:
./kkfly --jsonIf sudo: true, the runner uses sudo -n (no prompts). The remote user must have NOPASSWD sudo permissions, otherwise the host run will fail fast without hanging.