#!/bin/bash # Première version ip=$1 user=root workdir=/root/deploy ssh $user@$ip "mkdir $workdir" 2> /dev/null # Copie des scripts et fichiers scp "./createGroups.sh" "./logins.csv" "./Users.csv" "./createUsers.sh" $user@$ip:$workdir # Exécution les scripts ssh $user@$ip "bash $workdir/createGroups.sh" ssh $user@$ip "bash $workdir/createUsers.sh" ssh $user@$ip "rm -R $workdir"