RStudio server through ssh

August 10, 2012

(This article was first published on Quantitative thoughts » EN, and kindly contributed to R-bloggers)

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 [email protected] 

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:

  • enter about:config
  • change the value of network.proxy.socks to
  • change the value of network.proxy.socks_port to 2001
  • change the value of network.proxy.socks_version to 4
  • enter an internal address of remote server, something like
  • enjoy R and data mining

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. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training


CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)