#!/bin/bash # Ip passée en paramètre ip=$1 user=$user workdir=/$user/deploy ssh $user@$ip "mkdir $workdir" 2> /dev/null scp "./createGroups.sh" "./logins.csv" "Users.csv" "createUsers.sh" $user@$ip:$workdir ssh $user@$ip >> EOF bash $workdir/createGroups.sh bash $workdir/createUsers.sh rm -R $workdir EOF