instead of making a temp file and using SCP to overwrite existing authorized_keys folder, changed method to just append the existing authorized keys folder. This will allow the script to be run from multile clients on same server without deleting previous key setup every time you add a new key.