#!/bin/bash ip=$1 workdir=/root/deploy ssh root@$ip "mkdir $workdir" 2> /dev/null scp createGroups.sh $user$ip:$workdir scp createUser.sh $user$ip:$workdir scp login.csv $user$ip:/root scp Users.csv $user$ip:/root # exécution des scripts ssh $user@$ip "bash $workdir/createGroups.sh" ssh $user@$ip "bash $workdir/createUsers.sh" ssh root@$ip "rm -R $workdir" # suppression répertoire et scripts