title: rsync -- command-line for syncing from local to remote over ssh
body: <p>I'm looking for some assistance please to create a proper command-line for syncing from a local machine to a remote server over ssh.</p>
  
  <p>Here is a draft that is <em>not</em> working.</p>
  
  <pre><code>/usr/bin/rsync --dry-run --delete -arzh /Users/HOME/.0.data/ "--rsh=/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost" -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data &amp;&amp; bash --login"
  </code></pre>
  
  <p>The following command-line successfully logs in to my iphone over ssh via usb.  Id like to incorporate that working command-line into something that can be used with <code>rsync</code>, but I need some assistance in that regard.</p>
  
  <pre><code>/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data &amp;&amp; bash --login"
  </code></pre>
  
  <hr>
  
  <p>For anyone who is interested in leaning how to ssh into an iphone over usb, here is a link that discusses the method:  <a href="http://iphonedevwiki.net/index.php/SSH_Over_USB" rel="nofollow">http://iphonedevwiki.net/index.php/SSH_Over_USB</a></p>