Created
July 7, 2022 01:24
-
-
Save nuno1212s/14b305ed20a133ee6a4eadebd1af6eeb to your computer and use it in GitHub Desktop.
Toma lá
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MACHINES=("safe01" "safe02" "safe03" "safe04" "safe-gpu" "cop01" "cop02" "cop03" "cop04") | |
SESSION_NAME="ClusterDcc" | |
tmux kill-session -t $SESSION_NAME | |
tmux new-session -ds $SESSION_NAME | |
USER="nneto" | |
i=0 | |
for machine in "${MACHINES[@]}" | |
do | |
echo "Machine ${machine}" | |
i=$((i+1)) | |
tmux new-window -t $SESSION_NAME:${i} -n "${machine}" | |
tmux send-keys -t $SESSION_NAME:${i} "ssh -J ihaveakey@jump.dcc.fc.up.pt ${USER}@${machine}.dcc.fc.up.pt " KPEnter | |
done | |
tmux kill-window -t $SESSION_NAME:0 | |
tmux a -t $SESSION_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment