title: Using SCP function from Rcurl in R
body: <p>I have tested my SSH authentication using <code>PuTTY</code> with success, which I mean I can <code>ssh</code> to remote server using the private key provided. However, I am trying to use <code>SCP</code> function from <code>Rcurl</code> package in R, I got the error message saying: </p>
  
  <blockquote>
    <p>Error in function (type, msg, asError = TRUE)  : Authentication failure</p>
  </blockquote>
  
  <p>Here is my code</p>
  
  <pre><code>r &lt;- scp(host='eee.com', path = "/aaa/bbb/test.sas7bdat", 
           keypasswd = NA, user = "yyyyyy", rsa = TRUE, 
           key = "C:/Users/.ssh/authorized_keys", binary = NA)
  </code></pre>
  
  <p><code>C:/Users/.ssh/authorized_keys</code> is my private RSA key. </p>