Create Keys used to scp file from one server to another
I have some a file that I run on one server by a cron job.
Originally I had a file in my home dir "/home/user/update.sh" In that file I have a command to scp a file to my web server. I created keys so that a prompt for a password would not fail. The files were created in "/home/user/.ssh/id_rsa" and "/home/user/.ssh/id_rsa.pub". Then I copy the "id_ras.pub" to my webserver using the command "scp .ssh/id_rsa.pub firstname.lastname@example.org:.ssh/authorized_keys"
This all worked fine. But now the Sys Admin changed some things and all the cron job are now located in "/home/rootcrons/updates/update.sh but the files I need to scp are still in "/home/user/*"
It failed because of the Keys. My questions is hwo can I fix this? Do I have to create new keys for "/home/rootcrons/update/*" ? Or can the keys stay in "/home/user/.ssh/id_rsa" and "/home/user/.ssh/id_rsa.pub". Where does the file look for the key or the ".ssh folder"?