Connecting RStudio to a Network Environment

Greetings. I have Rstudio installed on my mac pro laptop. I wonder if I can connect RStudio to a network server that requires two-factor authentication and be able to work on a script directly on the server directory, i.e., the getwd() should be the target network directory.

This should be possible.

If I understood you correctly, you only want to access the files on the server, but not directly run RStudio on the remote server. If that is the case, you need to make the files on the server available on your Mac Pro laptop. There is various options available

  • Mount server directory via NFS or CIFS/SMB (need admin changes on the server)
  • Access remote files via sshfs (needs ssh server to run on the remote server)

An alternative would be to install Rstudio Server on the remote machine and then run RStudio directly on the remote server via the web browser.

@michaelmayer, you understood correctly. Regarding your possible options, mounting the server directory via NFS or CIFS/SMB may not be a viable solution for me because, as you point out, it would require admin changes, for which I do not have privileges. It's possible to access the files via sshfs, although I'm not sure this is available for mac. I have learned there is an R package called SSH which may work to create this bridge. I will need to figure out how to address the two-factor authentication process to access the server.
As far as the use of Rstudio Server, the network admins have installed a version of Rstudio on the server, but it's too slow and restricts my access to personal libraries.
I'll explore the sshfs or the ssh-package solutions. Thank you.

Great - if you are on Mac, this should help

As for the two-factor authentication - you will only need it once per session. And if it is possible to set up passwordless public key authentication with SSH, you will only need to use it once at all.

Thanks. I'll give it a try

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.