Running Rstudio with RDP (the easiest method)
Any Windows or Mac computer can use the Remote Desktop client for access to Rstudio.
- Start the VPN
- RDP to a compute server
- launch a graphical browser from the Applications > Internet menu, like Firefox or Google Chrome
- in that browser, visit http://localhost:8787
- log in with your unix username and password
Remember to Log Out
Regardless of how you log in to Rstudio, it is important for a user to logout from Rstudio before the browser is closed. The logout button in Rstudio is the grey -> to the left of the red button on the top right corner. Without loging out one can reopen the browser to continue in Rstudio without having to login. This leaves your files on the servers exposed via your browser. This is a worrisome security concern to remember.
Troubleshooting
If a subsequent runs fails to start, please check the directory .local/share/rstudio
in your home directory and see if there are any large files. There would be subfolders within rstudio. It is safe to delete these as Rstudio will recreate them as necessary.
Runnig Rstudio with a browser over forwarded X-Windows
To do this, ssh in to a compute server at nber with X forwarding. In a GUI ssh client this will be a checkbox or option somewhere. The command line ssh flag is -X.
ssh -X user@nber3.nber.org
Now, on the server command line, launch a browser as an X window. We have firefox and google-chrome installed. You can launch those from the command line with the commands
firefox
google-chrome
The X window will be sent through X forwarding to your local PC, but it will be running on the server. In that browser, put in the URL http://localhost:8787 .
Running Rstudio through an ssh tunnel to your local browser with a command-line ssh client
Modern MacOS, Windows, and Linux come with a command line ssh client. The ssh command at your terminal prompt would be:
ssh -L 8787:locahost:8787 user@nber4.nber.org
Then logon when prompted.
Explanation: Traffic to/from your local Mac's port 8788, goes via ssh, therefore encrypted, to nber4, and communicates with port 8787 on nber4, which is the port Rstudio responds to on nber4. Other servers could also be used.
Running Rstudio through an ssh tunnel to your local browser with a GUI ssh client
Note: Below nber7.nber.org is just an example, it can be any of nber1-nber9 or sas1.
Rstudio runs as a daemon and is accessed through the web browser.
Ssh tunnel setup varies by the ssh/tunnel client you use but the general principle is:
It is a 2 step process.
a) Establish a tunnel:
Forward local (your PC or MAC) port 8787 via ssh tunnel to localhost:8787 using the ssh session to ssh server nber7.nber.org. The "localhost" here refers to the ssh server.
b) Connect to Rstudio via web browser:
Then you connect on your PC or Mac's web browser with the url http://localhost:8787. The "localhost" in this case is your own PC or Mac.
For example, in Mobaxterm go to
Tools|MobaxtermTunnel|new
There are 5 fields to fill in.
Remote server | localhost |
Remote port | 8787 |
Forwarded port | 8787 |
ssh server | nber7.nber.org |
ssh login | userid |
ssh port | 22 |
Then Save, Start Tunnels, enter login id and password, tell Windows to allow access
Then browse to http://localhost:8787
and you can sign in to Rstudio as if you were on the LAN. Note that the first host mentioned above is the tunnel, the second host is where calculations take place. They can be the same, in fact that would be usual.
For support, please email it-support@nber.org.