title: rsync files as user using ssh key
body: <p>I'm trying to rsync some files over to a backup host I have.<br>
  I'd like to be able to do this as a cron user (named cron_user in this example).<br>
  The destination host has a "from" line in the ~/.ssh/authorized_keys file with the ip address, and I've copied the private DSA key to a user protected directory (specified within the encapsulated ssh -i command).  </p>
  
  <p>I'm still getting prompted for a password. Is there another way around this, or is there something I'm missing that bypasses requiring a password and referencing the ssh key I've specified?</p>
  
  <pre><code>sudo rsync  --timeout=3600 -azO  -e 'ssh -i /var/cron_user/cron_user' /tmp/bacup1-$(date'+%Y-%m-%d' ).tgz /tmp/backup2$(date '+%Y-%m-%d' ).tgz cron_user@hbackup00:/database/backups/app_backup/
  </code></pre>
  
  <p>Upon further investigation, using a -v shows that it's not allowing the use of the key based on IP:</p>
  
  <pre><code> IP: debug1: Remote: Your host '10.5.122.118' is not permitted to use this key for login. 
  </code></pre>
  
  <p>Although I have the IP listed in the /home/user_cron/.ssh/authorized_keys file: </p>
  
  <pre><code> [root@hbackup00 user]# cat ~cron_user/.ssh/authorized_keys 
   from="10.5.112.42,10.5.122.118,10.5.100.200,10.5.100.205,10.5.99.223,10.4.99.229,10.4.99.223,10.4.100.182" ssh-dss
  </code></pre>
  
  <p>Is there something I'm missing to allow this user to authenticate without a password? I've tested using a ssh -i invoking the same keyfile from other hosts listed here, no issues...</p>