@grissess batch scripts for the ITL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
309 B

7 years ago
7 years ago
  1. #!/bin/bash
  2. command="$(cat subcommand/batch.sh)"
  3. while read host opt_user opt_pwd; do
  4. user="${opt_user:-$1}"
  5. password="${opt_pwd:-$2}"
  6. SSHPASS="$password" sshpass -e ssh "${user}@${host}" -p 13699 -o StrictHostKeyChecking=no -o PubkeyAuthentication=no "$command" 2>> /tmp/batch_errors &
  7. done < all_hosts