This shows you the differences between two versions of the page.
add_ssh_key_to_multiple_host [2010/09/21 21:43] k2patel created |
add_ssh_key_to_multiple_host [2010/09/22 02:20] k2patel |
||
---|---|---|---|
Line 25: | Line 25: | ||
echo "Key Successfully Adde" | echo "Key Successfully Adde" | ||
scp /tmp/$file ${hostlist[${i}]}:.ssh/authorized_keys | scp /tmp/$file ${hostlist[${i}]}:.ssh/authorized_keys | ||
+ | rm -rf /tmp/$file | ||
else | else | ||
- | echo "Failed to add key for host \"${hostlist[${i}]}\" Check manually." | + | echo "Failed to add key for host \"${hostlist[${i}]}\" Check manually.\n" |
+ | echo "Local File \"/tmp/$file\" " | ||
fi | fi | ||
fi | fi |