25 points by blackmamoth 17 hours ago | 31 comments
It was inspired by tools like `pssh`, but I wanted something more modern, intuitive, and Pythonic.
What it does:
- Run shell commands on multiple servers (in parallel) - Push/pull files or directories with progress bars - Uses `~/.ssh/config` and lets you group hosts with YAML - Supports `--dry-run` mode to preview actions without executing - Outputs results using `rich` (tables, colors) - Built with `Typer`, `asyncssh`, and `rich`
There’s no daemon or extra setup, it reads your existing SSH config and just runs.
Would love feedback on general use and especially if there are ways to improve the `--dry-run` output.
andrewchilds 3 minutes ago
JulianWasTaken 31 minutes ago
For the most common cases I have it aliased to just `p`: https://github.com/Julian/dotfiles/blob/main/.config/zsh/com...
Or https://github.com/Julian/dotfiles/blob/4d36e6b17e9804a887ba...
naikrovek 26 minutes ago
Joker_vD 34 minutes ago
printf 'started: %s\n' "$(utcdate)"
(
trap 'kill 0' SIGINT
for REMOTE in "${REMOTES[@]}"
do
ssh -- "$REMOTE" "$COMMAND" "$@" &
done
wait
)
printf 'ended: %s\n' "$(utcdate)"
but twiddling with it has been quite annoying, so I'll look into this tool.proxysna 3 hours ago
I know it is easy to be a hater, but sincerely do not see a reason to use something like that over Ansible or just pure sh, ssh and scp. All you have to do is to set up keys and the inventory. Takes 10 minutes, even if you are doing it for the first time. And you can expand it if you need it.
alerighi 2 hours ago
The reasons I find it over Ansible are:
- takes the same syntax and options as plain SSH, just run over multiple hosts. So if you already know SSH, you know how to use pssh that is an extension of the command. Ansible requires to study it. The configuration format is trivial, just a file that contains on each line one host, no need to study complex formats like Ansible
- doesn't require dependencies on the target machine. Ansible, as far as I know, requires a python3 installation on the target machine. Something that, for example, is not granted in all settings (e.g. embedded devices, that are not strictly GNU/Linux machines, for example consider a lot of network devices that espose an SSH server, like Microtik devices, with PSSH is possible to configure them in batch), or in some settings you maybe need to work on legacy machines that have an outdated python version.
- sometimes simpler tool that just do one thing are just better. Especially for tools like pssh that are to me like a swiss army knife, the kind of tool that you use obviously when you are bodging something up to make something work because you are in an hurry and saves your day
Of course if you already use Ansible to manage your infrastructure you may as well use it to run a simple command. But if you have to run a command on some devices, that were not previously setup for Ansible, and devices trough which you may not have a lot of control (e.g. a bunch of embedded devices of some sort), pssh is a tool that can come handy.
blackmamoth 2 hours ago
proxysna 2 hours ago
liamkearney 2 hours ago
proxysna 2 hours ago
cynicalsecurity 36 minutes ago
revskill 1 hour ago
Stop assuming your method works across the universe of edge cases.
KAMSPioneer 1 hour ago
nasretdinov 4 hours ago
It's main advantage is that it allows you to do SSH agent forwarding that actually works at scale, since it limits concurrency when talking to SSH agent to a configurable amount (by default 128, the default connection backlog in OpenSSH ssh-agent)
blackmamoth 2 hours ago
mkayokay 4 hours ago
sshsync group web-servers "sudo systemctl restart nginx"
I like that you included a demo in the README, but it is too long for a gif, as I can't pause/rewind/forward. So splitting into multiple short gifs or converting into a video (if GitHub supports them) could improve the experience.blackmamoth 2 hours ago
And Yeah, now that you've mentioned it multiple shorter gifs would be better.
gamedna 3 hours ago
blackmamoth 2 hours ago
monster_truck 3 hours ago
I only needed a very small fraction of what it can do to bail a client out of a problem their customer caused on several hundred computers the night before an event, but it absolutely saved the day and a lot of money.
N2yhWNXQN3k9 3 hours ago
I have made scripts to do this with filter parameters over VMs on cloud providers, which is very valuable. Maybe you can extend this to have those options, so potential users are more attracted to it?
strzibny 3 hours ago
ahofmann 4 hours ago
XorNot 4 hours ago
Like a basic list of servers can also have this done via "ansible -m shell -a 'echo something' <server group>"
N2yhWNXQN3k9 3 hours ago
kachapopopow 2 hours ago
blackmamoth 2 hours ago
darrenf 3 hours ago
shaunpud 2 hours ago
gitroom 4 hours ago
deva502 3 hours ago
blackmamoth 2 hours ago