Это видео недоступно.
Сожалеем об этом.

How To:execute single command on multiple servers using pssh

Поделиться
HTML-код
  • Опубликовано: 19 авг 2024

Комментарии • 31

  • @mohitguptaji
    @mohitguptaji  5 лет назад +1

    You can join me on my whatsapp group for quick free queries and solution
    chat.whatsapp.com/E96jXVnZacM8MzffHKJkpv

  • @B-a_s-H
    @B-a_s-H 6 лет назад +2

    Awesome. Just what I needed.
    Thanks!

  • @mohitguptaji
    @mohitguptaji  4 года назад

    Thank you every one who like and subscribe my channel , i will upload mpre like this m working on many videos.

  • @vasantaambadkar8675
    @vasantaambadkar8675 6 лет назад +1

    very good video..thanks for sharing

  • @krishnaku6303
    @krishnaku6303 6 лет назад +2

    password should be same for both hosts? If i use RSA token does it help ?

  • @srinivaspaalakaveeti2082
    @srinivaspaalakaveeti2082 Год назад +1

    How can we execute multiple commands from one server on multiple remote machines ??

  • @sandeepsahu1716
    @sandeepsahu1716 2 года назад

    How to run the shell scripts in one go for multiple servers without using ansible..any alternative please

  • @krishnaku6303
    @krishnaku6303 6 лет назад

    this is not my personal machine to create and play with ssh-key-id, im not sure does im having access to create those keys

    • @Tom-vt5bf
      @Tom-vt5bf 5 лет назад

      As long as you have a user account on the server you can create ssh key and then copy it over. SSH key can me be more secure than a password as long as your using RSA.

  • @mkamran105
    @mkamran105 Год назад +1

    Using single script I have to take backup of crontab on multiple servers, could you please suggest how ?

    • @mohitguptaji
      @mohitguptaji  Год назад

      You can cat the file /var/spool/cron/USERname into a file name with server specific name in order to take backup

    • @mkamran105
      @mkamran105 Год назад

      @@mohitguptaji
      Thanks for the reply,
      I am totally new to scripting but my boss assigned me this task, we have 40 servers and from all these servers I have to take backup of cronjob using a single script.
      Please suggest example which I can understand

  • @gangadharpavan
    @gangadharpavan 2 года назад +1

    thanks, but how do we copy a file to 70 linux servers from 1 server and execute that file as root from sitting on 1 server ?

    • @mohitguptaji
      @mohitguptaji  2 года назад

      Instead of running the sample command you could used scp with the PSSH
      Or you can use ansible script for this task

    • @gangadharpavan
      @gangadharpavan 2 года назад

      @@mohitguptaji these servers doesn't support ansible.... I can copy but every time it is asking passwd.... expect/spawn not working....and if I copy and when I try to execute this script I should be a root user....how do I elevate my privilege as root user....root passwd is diff for all 70 servers and we can't make any changes to sudoers file/ssh config

    • @mohitguptaji
      @mohitguptaji  2 года назад

      @@gangadharpavan either you need direct access of root in remote machine already configured.
      Or you need to add that user in /etc/sudoers.d/user file with an entry which allows user to use sudo without password

    • @mohitguptaji
      @mohitguptaji  2 года назад

      You kay join our whatsapp group or more help

    • @gangadharpavan
      @gangadharpavan 2 года назад

      @@mohitguptaji thanks much

  • @debashisdas1975
    @debashisdas1975 5 лет назад

    what is the significance of "uptime" ?

    • @Tom-vt5bf
      @Tom-vt5bf 5 лет назад +1

      Uptime will show you how long your systems has been up since the last reboot. It will also show you the load average of the system. From left to right 1 minute, 5 minutes and 15-minute averages I believe. Doing this off memory so I might be a little off on time.

    • @mohitguptaji
      @mohitguptaji  4 года назад

      please subscribe to my channel and hit the bell icon

  • @solaprudhvi2232
    @solaprudhvi2232 4 года назад

    How to invoke the the script on multiple servers from one server
    like when you run sh runScript.sh on 192.168.122.145
    it should start on one more server
    say 192.168.122.183

    • @mohitguptaji
      @mohitguptaji  4 года назад

      In this video it is explained already you just need to create host file and add servers then run commands

  • @shahbaz3949
    @shahbaz3949 3 года назад

    Im facing error Exited with code 255

    • @mohitguptaji
      @mohitguptaji  3 года назад +1

      Find the pinned comment and join our whatsapp community and post your query with screenshot.

    • @shahbaz3949
      @shahbaz3949 3 года назад +1

      @@mohitguptaji I had posted My query in the group..Kindly check it

    • @mohitguptaji
      @mohitguptaji  3 года назад

      @@shahbaz3949 sure