If file $temp_ssh_key exists with permission 0400, file_put_contents would fail.