I'm setting up backup server, that will connect to production server and fetch backup with rsync via cron task. I have user on my backup server, I created public key and I can log with ssh to production without typing password, but I need to add my key to ssh-agent.
ssh -p 1234 -i id_rsa_pass [email protected] The problem is that when I log out, ssh-agent is off and rsync fails, because it wants password.
rsync -azP --delete -e "ssh -p 1234 -i /home/backup_user/.ssh/id_rsa_pass" [email protected]:/home/prod_user/backup/ /home/backup_user/backup Is it possible to use rsync in cron without password? When my key has password and it is not possible to add key to ssh-agent?
Is it good idea to use key without password?