Attempting to download files from SFTP using R

前端 未结 3 1519
别跟我提以往
别跟我提以往 2021-01-15 05:50

I\'m trying to implement R in the workplace and save a bit of time from all the data churning we do.

A lot of files we receive are sent to us via SFTP as they contai

3条回答
  •  失恋的感觉
    2021-01-15 06:26

    Note that there are two packages, RCurl and rcurl. For RCurl, I used successfully keyfiles to connect via sftp:

    opts <- list(
        ssh.public.keyfile = pubkey, # file name
        ssh.private.keyfile = privatekey, # filename
        keypasswd <- keypasswd # optional password
    ) 
    RCurl::getURL(url=uri, .opts = opts, curl = RCurl::getCurlHandle())
    

    For this to work, you need two create the keyfiles e.g. via putty or similar.

提交回复
热议问题