Linux Bash script task need help!

please make sure script won’t ask for password while copying the archive file…iam very confused to use ssh-key gen and ssh-copy-id for this task as i use both also it will ask password for the first time… how to do that with out asking pwd at all and copy the file.
Thanks!!