6
billgates
12d

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
  • 4
    you can always script it ;) or use mssh
  • 2
    Just use ssh to send one command and dump the result
    It has a mode to not start interactive prompt.
  • 7
    This is almost certainly one of the reason scripting languages were invented.
  • 5
    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.
  • 3
    @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..
  • 1
    @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.
  • 6
    MobaXterm.
  • 2
    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.
  • 2
    @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.
  • 3
    @DubbaThony I still use putty and pretty content with it. :D I just worked with some really old developers who prefer not to type in commands especially during navigation. MobaXterm is like a combination of putty + winscp. You can click around into different directories and the terminal would cd there.

    @billgates I remember setting MobaXterm up into four split terminals when I was managing multiple servers. There's a setting to enable typing into one terminal and the others will follow. It was back in 2016 though and I don't use it now. I'm sure you'll find that information online. Have fun.
  • 2
    @rutee07 yes I checked the feature list, it's there
  • 3
    @billgates ansible.
    thank me later.
  • 3
    @C0D4 fuck man, that's deep!
    But sometimes is better no reinventing the wheel.
  • 2
    @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
    @billgates yep, that's what I said.
  • 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
  • 1
    @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.
Your Job Suck?
Get a Better Job
Add Comment