Search code examples
linuxshpssh

how to run multiple command in single line pssh?


I want to run multiple command like command1, command2 , command3 in single line how to do?

i tried following

pssh -Pi --user XXXX -h host.txt  -x "-oStrictHostKeyChecking=no" ls date 

i am getting following error

Stderr: ls: cannot access date: No such file or directory

Solution

  • Following worked for me after trying few combinations

    pssh -Pi --user XXXX -h host.txt  -x "-oStrictHostKeyChecking=no" ls;date;