Originally Posted by willc86
the password i type in is what i use to log on locally to the server.
Good .. I was just making sure you didn't have keys already generated which had their own password.
so should i try copying the /id_rsa.pub to the authorized_keys?
should i generate keys? would it still ask for a password?
i actually checked to see if i have a .ssh/id_rsa.pub file and i dont =/
do i have to generate one?
Yes, run "ssh-keygen" on the sending
server (the one running the cron job) and just press Enter when it prompts you for a filepath and for a passphrase. Adding a passphrase to a key is an additional layer of security, but it gets in the way when you're automating tasks like this.
After ssh-keygen has run, there will be a /home/willc86/.ssh/id_rsa.pub file on that server. This is the public key part of the private/public keypair.
It is safe to pass the public key around as long as you keep the private key to yourself (the id_rsa file, without the .pub).
On server02, create a directory /home/willc86/.ssh, and copy the public key id_rsa.pub from the sending server to server02:/home/willc86/.ssh/authorized_keys -- this tells server02 that ssh connections using the private key matched to this public key are to be trusted, and to not require a password.
One last thing is needed: ssh or scp from the sending server to server02, so that the sending server gets an entry in .ssh/known_hosts. Afterwards, you should be able to ssh or scp from the first server to server02 without any prompts or entering a password.
There's a chance your sshd on server02 is configured to disallow this kind of authentication, but it's unlikely. If the instructions here don't work, show the commands you used and their responses, and the contents of /etc/ssh/sshd_config here and we'll sort it out.