I have two servers, serverA and serverB.
At present I run a shell script on serverA that creates a file and 'pushes' it to serverB.
The shell script runs as a cron every hour and requires
However, due to changes in our setup, I can no longer 'push' the file from serverA to serverB, and instead I now need to 'pull' the file from serverB to serverA.
Is there a 'correct' way of connecting to a remote server and executing a script that requires elevated privileges? but without having to write down the password in the shell script on serverB?