You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
273 B
11 lines
273 B
#!/bin/bash
|
|
|
|
ssh-keygen -t rsa
|
|
|
|
network=$(ifconfig | grep 255.255.0.0 | awk '{print $2}' | cut -d '.' -f1-3)
|
|
network="$network.*"
|
|
hosts=$(nmap -sP $network | grep worker | awk '{print $6}' | cut -d ')' -f1 | cut -d '(' -f2)
|
|
for ip in $hosts
|
|
do
|
|
ssh-copy-id docker@$ip
|
|
done
|
|
|