Site icon R-bloggers

RStudio server through ssh

[This article was first published on Quantitative thoughts » EN, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

R language has numerous IDEs – RStudio, Vim plugin, Eclipse plugin. RStudio really shines for R language, nevertheless Vim plugin might be well adapted for R if you are Vim guru. Eclipse? Who needs such behemoth? Turns out a student in Ljubljana badly needs it.

Most of the time I use remote server for R related tasks, which I access through ssh. To get graphical UI and RStudio I use No Machine remote desktop client over ssh. I could use Vim, however I never managed to run it my way. The cool thing about RStudio that it comes in two flavours – desktop and server side. RStudio server version allows you to access R through web interface, meaning that you can use it remotely. Despite the fact I was afraid to open other port than ssh on remote machine for security reasons. The traffic between client and RStudio server is encrypted, however that does not eliminate vulnerabilities of RStudio itself. One way to come around this problem is to use Virtual Private Network, but installation of VPN is not that trivial.

During the holidays, when my brain was half empty, I started to wonder, if I really need VPN to access RStudio server in secure way. Well, not at all! What you have to do is to run SOCKS proxy on local machine, which is very easy on Linux/Mac:

ssh -D 2001 username@mysecureserver.com 

Keep the connection open and then, open a web browser and set up all traffic to go through proxy on local machine and port 2001. Here is an example for Firefox:

If you need user friendly description of SOCKS proxy set up, refer this post. More information about RStudio server can be found here.

To leave a comment for the author, please follow the link and comment on their blog: Quantitative thoughts » EN.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.