frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

https://github.com/Blackmamoth/sshsync
19•blackmamoth•15h ago
I built a CLI tool called `sshsync` to run shell commands and transfer files across multiple servers over SSH concurrently.

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.

Comments

ahofmann•2h ago
This looks great. I've used ansible in the past, is this tool like a stripped down (and thus simpler to use) version of ansible?
XorNot•2h ago
Given that ansible can be installed via "pip install ansible" I'm not sure how much simpler you can get?

Like a basic list of servers can also have this done via "ansible -m shell -a 'echo something' <server group>"

N2yhWNXQN3k9•1h ago
yeah, ansible is very nice also in that it can have multiple inventories across cloud providers for running whatever, with minimal setup, and without needing to modify your ssh host config
mkayokay•2h ago
How are commands handled, that require user input? E.g. password for sudo in your example:

  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•40m ago
As of now there is no way to take user input in transit, so either the user is required to have the privilege to execute the specified command or have passwordless sudo available.

And Yeah, now that you've mentioned it multiple shorter gifs would be better.

nasretdinov•2h ago
Around 10 years ago I was supporting infrastructure at a PHP shop and we needed a similar thing, but for ~3000 servers, and the library that we were using (libpssh) didn't support async SSH agent authentication, so I built this small tool in Go to allow to implement such tooling in any language (PHP, Python, whatever) in a simple way: https://github.com/YuriyNasretdinov/GoSSHa

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•44m ago
Hey man that's really cool, I never really thought of making this interactive.
gamedna•1h ago
Curious to understand the need to create this over using tools like pssh, etc.

https://linux.die.net/man/1/pssh

blackmamoth•37m ago
I was getting bored, this seemed like a cool project to work on outside of work, that's why. One of my colleagues found it useful for his needs, so I figured there might be other people who'd find this useful too.
deva502•1h ago
The lack of research, the AI-generated README and comments, and the "Pythonic" approach (while Ansible exists) made me laugh. I guess it's a good CS50 project, but it's not presentable at all and doesn't have real-world usage.
blackmamoth•32m ago
Hey, yeah I admit i should've written the README myself, but I'm kinda lazy , so I let gpt handle both readme and the post. And I do know there are other tools way better than this and battle tested, but I just built this for fun and not to compete with any of them.
strzibny•1h ago
If you deploy with Kamal you practically get this, except maybe the file push, that's a nice touch.
monster_truck•1h ago
Have you looked at what powershell does? Invoke-Command (and the Job stuff it meshes perfectly with via AsJob) is really nice

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•1h ago
The dry-run option is nice, but you can do this easily in a normal environment without special tooling (GNU parallel, etc).

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?

proxysna•1h ago
ansible my_servers -m shell -a 'fortune && reboot' -b

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.

liamkearney•52m ago
Ansible is one of the best examples of needless complexity I’ve ever interacted with.
proxysna•12m ago
Ansible is the easiest tool for configuration management to onboard and start using. Great documentation, large community. It is as complex as you want it to be and it's complexity scales with your infra. ofc YMMV.
alerighi•32m ago
I use pssh often (not this tool, but as I understand is similar).

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•25m ago
I know ansible or even custom shell scripts are way better and optimized for such use cases. However, I just wanted to show something I built that might be useful to someone.
proxysna•17m ago
My comparison is most likely unfair because i am looking at it through a distorted lens of running all sorts of configuration management in production or at home for years. So i might be the wrong person to make judgement on it and just being a hater for no good reason.
darrenf•1h ago
See also: fabric. https://docs.fabfile.org/en/latest/
shaunpud•50m ago
See also: pyinfra. https://docs.pyinfra.com/en/latest/
kachapopopow•56m ago
This would only be interesting if it wasn't written in python, but native instead.
blackmamoth•43m ago
Originally I was going to write the prototype in python and than later reimplement it in Golang, but right now I'm not sure if it's needed

Show HN: Goboscript, text-based programming language, compiles to Scratch

https://github.com/aspizu/goboscript
97•aspizu•4h ago•26 comments

Show HN: Every side project I've built since 2009

https://naeemnur.com/side-projects/
19•naeemnur•1h ago•1 comments

InventWood is about to mass-produce wood that's stronger than steel

https://techcrunch.com/2025/05/12/inventwood-is-about-to-mass-produce-wood-thats-stronger-than-steel/
110•LorenDB•21h ago•102 comments

Seagate claims spinning disks beat SSDs on carbon footprint

https://blocksandfiles.com/2025/04/16/seagate-decarbonizing-data-report/
13•rbanffy•1h ago•12 comments

`This Printer company served you malware for months, called them false positives

https://www.neowin.net/news/this-printer-company-served-you-malware-for-months-and-dismissed-it-as-false-positives/
91•bundie•2d ago•38 comments

New research reveals the strongest solar event ever detected, in 12350 BC

https://phys.org/news/2025-05-reveals-strongest-solar-event-bc.html
180•politelemon•3d ago•85 comments

What does the end of mathematics look like?

https://www.awanderingmind.blog/posts/2025-05-18-what-does-the-end-of-mathematics-look-like.html
25•awanderingmind•2h ago•24 comments

Spaced repetition systems have gotten better

https://domenic.me/fsrs/
883•domenicd•22h ago•462 comments

Emulator Debugging: Area 5150's Lake Effect

https://martypc.blogspot.com/2025/05/emulator-debugging-area-5150s-lake.html
5•rbanffy•1h ago•0 comments

“There are people who can see and others who cannot even look”

https://worldhistory.substack.com/p/there-are-people-who-can-see-and
139•crescit_eundo•9h ago•25 comments

Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

https://github.com/Blackmamoth/sshsync
19•blackmamoth•15h ago•24 comments

Ditching Obsidian and building my own

https://amberwilliams.io/blogs/building-my-own-pkms
346•williamsss•17h ago•387 comments

Llama from scratch (2023)

https://blog.briankitano.com/llama-from-scratch/
41•sebg•4d ago•0 comments

Show HN: I modeled the Voynich Manuscript with SBERT to test for structure

https://github.com/brianmg/voynich-nlp-analysis
340•brig90•18h ago•102 comments

Layers All the Way Down: The Untold Story of Shader Compilation

https://moonside.games/posts/layers-all-the-way-down/
63•birdculture•7h ago•28 comments

Show HN: Job board aggregator for best paying remote SWE jobs in the U.S.

https://www.remoteswe.fyi
62•xitang•9h ago•42 comments

France Endorses UN Open Source Principles

https://social.numerique.gouv.fr/@codegouvfr/114529954373492878
467•bzg•11h ago•135 comments

Font Activations: A Note on the Type

https://robhorning.substack.com/p/font-activations
37•prismatic•2d ago•0 comments

$30 Homebrew Automated Blinds Opener

https://sifter.org/~simon/journal/20240718.html
261•busymom0•17h ago•117 comments

Programming in Martin-Lof's Type Theory: An Introduction (1990)

https://www.cse.chalmers.se/research/group/logic/book/
15•todsacerdoti•2d ago•0 comments

Charles Butler's the Feminine Monarchie, or the History of Bees (1634 Edition)

https://publicdomainreview.org/collection/history-of-bees/
3•diodorus•3d ago•0 comments

Spaced Repetition Memory System

https://notes.andymatuschak.org/Spaced_repetition_memory_system
224•gasull•18h ago•26 comments

What do wealthy people buy, that ordinary people know nothing about? (2015)

https://old.reddit.com/r/AskReddit/comments/2s9u0s/comment/cnnmca8/
184•Tomte•18h ago•298 comments

The Connoisseur of Desire

https://www.nybooks.com/articles/2025/05/29/the-connoisseur-of-desire-the-annotated-great-gatsby/
23•samclemens•2d ago•0 comments

K-Scale Labs: Open-source humanoid robots, built for developers

https://www.kscale.dev/
101•rbanffy•15h ago•45 comments

Show HN: A platform to find tech conferences, discounts, and ticket giveaways

https://www.tech.tickets/
75•danthebaker•2d ago•21 comments

Hyper Typing

https://pscanf.com/s/341/
85•azhenley•13h ago•59 comments

Show HN: Vaev – A browser engine built from scratch (It renders google.com)

https://github.com/skift-org/vaev
195•monax•16h ago•112 comments

Show HN: Python Simulator of David Deutsch’s “Constructor Theory of Time”

https://github.com/gvelesandro/constructor-theory-simulator
75•SandroG•13h ago•10 comments

Show HN: I reinvented PHP in TypeScript (demo)

https://github.com/vseplet/morph
5•vseplet•3d ago•6 comments