Connecting to an anvi’o server on tatabox

We use anvi’o for all sorts of ‘omics analysis, but it is a pain to run on your laptop as you can’t watch netflix and youtube, check facebook, and post to twitter at the same time (well, you can, but why would you?).

Instead, we have the latest version of anvi’o installed on tatabox, one of the machines in our HPC environment. After you have run all the anvi-commands, very often you want to launch anvi-interactive, but tatabox is safely behind a firewall. 

We can make a two step connection to tatabox using port tunneling. Depending on how you do this, you will need three terminals open.

First, start anvi-interactive on tatabox, and keep that window open (or use screen or tmux which are much better alternatives).

Next, open a terminal on your computer, and use this command (obviously changing USERNAME to your USERNAME).

ssh -L 5555:localhost:7008 -N -p 7010 USERNAME@edwards-data.sdsu.edu

Next, open another terminal (or if you are using screen or tmux, open a new terminal emulator), and login to edwards-data.sdsu.edu using your normal account (the USERNAME from above).

On edwards-data, run this command:

 ssh -L 7008:localhost:8080 -N USERNAME@tatabox

Finally, on your laptop, you should open a new browser window and paste this URL:

http://localhost:5555/

You should see the anvi-interactive interface appear, and you can get to work.