Live data from Hacker News

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

github.com

21–30 of 77 posts

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

#21
post #4

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.

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.

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

#22
post #7

Curious to understand the need to create this over using tools like pssh, etc. https://linux.die.net/man/1/pssh

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.

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

#23
post #8

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.

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.

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

#24

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.

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.

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

#25

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.

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.

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

#26

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.

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.

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.

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

#27

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.

Ansible is one of the best examples of needless complexity I’ve ever interacted with.

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.

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

#28

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.

Ansible doesn't work on windows.

Stop assuming your method works across the universe of edge cases.

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

#29

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.

Ansible doesn't work on windows. Stop assuming your method works across the universe of edge cases.

I mean, Ansible isn't the best choice for Windows configuration, I would agree, but you're not strictly correct: https://docs.ansible.com/ansible/latest/os_guide/windows_usa...

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

#30

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.

Ansible requires python to be installed on all of the target computers.
Post reply on HN