I am trying to pull a file from another computer into the R environment in RStudio on Centos 6
I first tried this in regular R, and when I issued
readLines(pipe( 'ssh root@X.X.X.X "cat /path/somefile.sh"' ))
it correctly asks me for the password for my ssh key and reads the contents.
However, if the same command is executed from RStudio, all I get is:
ssh_askpass: exec(rpostback-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(rpostback-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(rpostback-askpass): No such file or dire Permission denied (publickey,gssapi-with-mic,password).
I suspect that the reason is that rstudio on centos actually uses the user rstudio-server (and gui is provided in the browser). Does anyone know how to properly access ssh'd resources?
UPD: after execution
Sys.setenv(PATH = paste0(Sys.getenv('PATH'), ':/usr/lib/rstudio-server/bin/postback'))
as suggested below, it will not output crawl errors, but it still doesn't work. Now it seems that the console expects the command to be executed indefinitely
source share