5
donuts
6y

Is there an SSH app like Putty that can login to multiple servers at a time and execute the same command?

We have multiple servers and trying to locate a request in the logs. The structure of all the machines are the same so I want to just toe each command like CD, grep, etc one time and see the output from all of them.

Rather then logging in one by one.

Comments
  • 2
    you can always script it ;) or use mssh
  • 4
    Just write a script to ssh into a sever or a bunch of selected servers - or all, and run your commands and bring the output back.

    We as devs don't need pre-built tools, we build them.
  • 2
    @C0D4 So i clicked here to write exacly these words...

    I guess Im late half an hour.
  • 1
    @C0D4 but I want an interactive GUI, just that I can do it all at once.

    I have done scripts to field the logs from all of them at once but I'd rather just grep all of them at once. I guess ELK before ELK..
  • 2
    @billgates i get the ease of a GUI, but when messing with servers, the only thing you need is a terminal window 🙂

    Well unless it's a windows server, but I can tell you clear don't mean that.
  • 1
    I guess he does it for somebody who isnt really comfortable with TUI (like my boss who literally panicked when I launched terminal on his macbook for first time becouse pendrive didnt want to mount. he panicked even more when sudo asked for password)

    So I would say make a gui, I would choose QT for that but its up to your taste, and in that GUI app just call your script that will create logs and than make GUI application process them. That shouldn't be too hard.
  • 1
    @rutee07

    wow, it seems Im too oldschool using putty. Will more than definitely try this out. Looks pretty darn nice.

    Thanks for share.
  • 1
    @C0D4 a terminal window is a GUI? I just don't want to have to login N times and paste the same commands N times
  • 1
    ssh command allows you to drop into remote session certain commands, get output and disconnect. Given some quite simple scripting you can iterate over <insert any insane big number> of same setups and get all the logs you need.
  • 1
    @rutee07 yes I checked the feature list, it's there
  • 2
    @billgates ansible.
    thank me later.
  • 1
    @maushax I build things too but I don't like spending time reinventing a wheel... Especially one that's not as good as an existing one.
  • 1
    You could try Clusterssh.
  • 0
    mremoteNG
  • 0
    This functionality is built into iterm.

    However, you should just loop it, or use a concurrency app like pssh.
  • 2
    for i in `cat filename`; do ssh user@$i command > outfile ; done
  • 0
    I have such a program, wanna trade for 5$ 😂
  • 0
    Ansible
  • 0
    Termius
    Thank me later
  • 1
    I've used SecureCRT for stuff like that but there are free alternatives
  • 0
    @rutee07

    So I successfully added MobaXterm into my toolkit.

    And I find it usefull in only scenarios when Im working with sites that require some advanced editing. Having ability to open files in notepad++ is great.

    For most usecases still putty stays my go-to. But as mentioned, that's tool I actually needed but wasn't aware I needed it. Kudos, for share.
Add Comment