#!/bin/bash

# sync public/private ssh key
alias ssh="ssh -o StrictHostKeyChecking=no"

for server in $(sed -n '/BELOW/,/ABOVE/p' /etc/hosts|grep "^[0-9]"|awk '{print $1}'); do
	scp ~/.ssh/id_rsa.pub $server:~/.ssh/
	scp ~/.ssh/id_rsa $server:~/.ssh/
	scp ~/.ssh/known_hosts $server:~/.ssh/
done
