scp -i ~/.ssh/id_rsa.pub events*$date*_QA.log $remote_user@$remote_server:$remote_location
Is the aforementioned script incorrect? Am I not doing it correctly?
I went to the
.ssh directory and saw that the remote server is in the
But, when I do ordinary scp without any file as parameter, it is still asking for password
scp events*$date*_QA.log $remote_user@$remote_server:$remote_location
How can I include the key file in my command?
sh-3.2$ grep server ~/.ssh/* /home/user/.ssh/known_hosts:server....com,ip_addr ssh-rsa Asine=jhjsdhfjsadhfjkashdfjhasdjfhksadjfhasjdfhj