@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

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