I have setup passwordless login between two servers by generating the id_rsa.pub file on serverA and copying it to serverB. That works fine for a period of time and then for some reason the passwordless login stops working.
To fix it I just copy the id_ras.pub file again as authorized_keys to the other server.
My question is why is this happening? This is used by a script that uses scp to copy a file as part of a script so eventually that script fails and causes issues.

Any advice?