This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
add_ssh_key_to_multiple_host [2010/09/21 21:43] k2patel created |
add_ssh_key_to_multiple_host [2020/08/10 02:35] (current) |
||
---|---|---|---|
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 |