EVOLUTION-MANAGER
Edit File: scp.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Retrieve contents of a file from a remote host via SCP...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for scp {RCurl}"><tr><td>scp {RCurl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Retrieve contents of a file from a remote host via SCP (Secure Copy)</h2> <h3>Description</h3> <p>This function allows us to retrieve the contents of a file from a remote host via SCP. This is done entirely within R, rather than a command line application and the contents of the file are never written to disc. The function allows the </p> <h3>Usage</h3> <pre> scp(host, path, keypasswd = NA, user = getUserName(), rsa = TRUE, key = sprintf(c("~/.ssh/id_%s.pub", "~/.ssh/id_%s"), if (rsa) "rsa" else "dsa"), binary = NA, size = 5000, curl = getCurlHandle(), ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>host</code></td> <td> <p>the name of the remote host or its IP address</p> </td></tr> <tr valign="top"><td><code>path</code></td> <td> <p>the path of the file of interest on the remote host's file systems</p> </td></tr> <tr valign="top"><td><code>keypasswd</code></td> <td> <p>a password for accessing the local SSH key. This is the passphrase for the key.</p> </td></tr> <tr valign="top"><td><code>user</code></td> <td> <p>the name of the user on the remote machine</p> </td></tr> <tr valign="top"><td><code>rsa</code></td> <td> <p>a logical value indicating whether to use the RSA or DSA key</p> </td></tr> <tr valign="top"><td><code>key</code></td> <td> <p>the path giving the location of the SSH key. </p> </td></tr> <tr valign="top"><td><code>binary</code></td> <td> <p>a logical value giving </p> </td></tr> <tr valign="top"><td><code>size</code></td> <td> <p>an estimate of the size of the buffer needed to store the contents of the file. This is used to initialize the buffer and potentially avoid resizing it as needed.</p> </td></tr> <tr valign="top"><td><code>curl</code></td> <td> <p>a curl handle (<code><a href="getCurlHandle.html">getCurlHandle</a></code>) that is to be reused for this request and which potentially contains numerous options settings or an existing connection to the host.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional parameters handed to <code><a href="curlPerform.html">curlPerform</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>This uses libcurl's facilities for scp. Use <code>"scp" %in% curlVersion()$protocols</code> to see if SCP is supported. </p> <h3>Value</h3> <p>Either a raw or character vector giving the contents of the file. </p> <h3>Author(s)</h3> <p>Duncan Temple Lang </p> <h3>References</h3> <p>libcurl <a href="http://curl.haxx.se">http://curl.haxx.se</a> </p> <h3>See Also</h3> <p><code><a href="curlPerform.html">curlPerform</a></code> <code><a href="curlOptions.html">getCurlOptionsConstants</a></code> </p> <h3>Examples</h3> <pre> ## Not run: x = scp("eeyore.ucdavis.edu", "/home/duncan/OmegaWeb/index.html", "My.SCP.Passphrase", binary = FALSE) x = scp("eeyore.ucdavis.edu", "/home/duncan/OmegaWeb/RCurl/xmlParse.bz2", "My.SCP.Passphrase") o = memDecompress(x, asChar = TRUE) ## End(Not run)</pre> <hr /><div style="text-align: center;">[Package <em>RCurl</em> version 1.98-1.2 <a href="00Index.html">Index</a>]</div> </body></html>