Created
January 5, 2017 18:11
-
-
Save hoto/4c0aed8399ed471d53b1c7bbbcf775ee to your computer and use it in GitHub Desktop.
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
LIST=`fleetctl list-machines | grep worker | awk '{print $2}'` | |
for item in $LIST; do echo $item; done | |
for item in $LIST; do ssh -A core@$item; done |
Author
hoto
commented
Jan 27, 2017
Update:
LIST=$(fleetctl list-machines | grep worker |awk '{print $2}')
for item in $LIST; \
do echo "Found Machine IP=$item"; \
done
for item in $LIST; do \
echo "Machine IP=$item" && \
ssh -A -o StrictHostKeyChecking=no core@$item \
hostname \
; done
for item in $LIST; do \
echo "Machine IP=$item" && \
ssh -A -o StrictHostKeyChecking=no core@$item \
echo "xxx" >> ~/.ssh/authorized_keys \
; done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment