Difference between revisions of "Amarel"

From WikiROMS
Jump to navigationJump to search
Line 21: Line 21:
[[Image:AnyConnect_Credentials.png]]
[[Image:AnyConnect_Credentials.png]]


Click '''OK'' and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows [[Image:AnyConnect_win_connected.jpg]]) or in the menu bar (Mac OS [[Image:AnyConnect_mac_connected.png|25px]]).
Click '''OK''' and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows [[Image:AnyConnect_win_connected.jpg]]) or in the menu bar (Mac OS [[Image:AnyConnect_mac_connected.png|25px]]).


==Connecting to Amarel with SSH==
==Connecting to Amarel with SSH==
Line 42: Line 42:
# You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.
# You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.
# In the future you can click '''Sessions''' (not Session) and select '''amarel.rutgers.edu''' and not have to enter your password.
# In the future you can click '''Sessions''' (not Session) and select '''amarel.rutgers.edu''' and not have to enter your password.
==Setting up your .bashrc==
The main Amarel software setup by OARC does not include the software needed to compile and run ROMS. In order to use the software needed for running ROMS and other models, you will need to add a couple lines to the login script (.bashrc, .cshrc, etc.) in your home directory.
Unless otherwise requested your default shell will be bash. and the following two lines should be added near the top of your .bashrc:
<div class="box">export MODULEPATH=/projects/dmcs_1/sw/modulefiles/Core:${MODULEPATH}
export SQUEUE_FORMAT=“%.18i %.9P %.8j %.8u %.2t %.10M %.10l %.4C %.6D %R”</div>
The first line will tell Lmod where to find the modules that will load the custom software. The second line makes the squeue command (explained later) more useful. Once you have added these lines, log out and back in or source your .bashrc for them to take effect.

Revision as of 04:30, 7 January 2022

Using Amarel

Rutgers VPN

If you are not on campus, you will need first need to connect to the Rutgers VPN. In order you connect to the Rutgers VPN, you must first enroll in Duo 2 Factor Authentication (NetID+). Most users have probably already done this. If not, navigate to https://netid.rutgers.edu/setupTwoFactorAuthentication.htm and follow the instructions.

Once you are enrolled in NetID+ you will need to activate the VPN service, if you have not already. Navigate to https://soc.rutgers.edu/vpn/ and click the gray button titled Service Activation. If you are not already logged in you may be asked to login and/or approve you login with the Duo Mobile app. To activate the VPN service, click the checkbox next to Remote Access VPN, Cisco AnyConnect Access for Rutgers and click the Activate Services button.

You are now ready to download the Cisco VPN client and connect to the Rutgers VPN. Complete instructions can be found here by clicking the red button titled General VPN Instructions to download the PDF. The instructions are geared towards Windows so if you are using a Mac you might find this page more helpful. In most cases, regardless of your operating system, pointing your browser to https://vpn.rutgers.edu/ and logging in with your NetID will lead you to downloading the correct VPN client.

Once installed, open the Cisco AnyConnect client and type vpn.rutgers.edu in the box and click Connect:

AnyConnect Connect.png

In the next window, the Username will be your NetID, the password field for either will be your NetID Password and for 2FA, you have 4 options to enter in the Second Password/Duo Action field:

  • Enter a 6 digit Duo Passcode. These are generated either by a Hard Token, showing the passcode in the Duo Mobile App, or from a previous “SMS” request. Simply type in the 6 numbers and hit OK.
  • Type the word “push”. This will send a push notification to the primary device you have enrolled with Duo through NetID+ with the option to Accept or Deny.
  • Type the word “phone”. You will receive a phone call to the primary device you have enrolled with Duo through NetID+ with touch tone options to Accept or Deny.
  • Type the word “sms”. You will receive a text message to the primary device you have enrolled with Duo through NetID+ containing passcodes you can use to logon.

AnyConnect Credentials.png

Click OK and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows AnyConnect win connected.jpg) or in the menu bar (Mac OS AnyConnect mac connected.png).

Connecting to Amarel with SSH

In order to connect to amarel and compile and run ROMS you will need an SSH/terminal client. If you already use an SSH/terminal application you are comfortable with the stick with that and modify the instructions below accordingly. For these instructions to work you need to either be on campus or connected to the Rutgers VPN.

Mac OS

If you are on a Mac, open Terminal (found in the Applications -> Utilities folder) or iTerm2 and type:

ssh fakeuser@amarel.rutgers.edu

replacing fakeuser with your NetID. When it asks if you want continue connecting enter yes, then enter your NetID password. Having to type the above command and password every time can be annoying and time consuming. Luckily there a couple things you can do to make things easier.

  1. If you are still connected to amarel, disconnect by entering exit
  2. At the prompt for your local machine, enter nano ~/.ssh/config and paste the block below at the end of the file:
    Host amarel
    Hostname amarel.rutgers.edu
    HostKeyAlias amarel
    User [NetID]
    replacing [NetID] with your own NetID. Save and exit (Ctrl+o Ctrl+x). This allows you to type ssh amarel to connect.
  3. Enter ls ~/.ssh if there is a file called id_rsa.pub skip to 5
  4. Enter ssh-keygen -t rsa, then hit return to accept the default location, enter a passphase twice (or leave blank for no passphrase)
  5. Copy the public portion of the key to amarel by entering scp ~/.ssh/id_rsa.pub amarel:.
  6. SSH to amarel (ssh amarel) and enter the following cat ~/id_rsa.pub >> ~/.ssh/authorized_keys then exit back to your local machine and execute ssh amarel again. It should no longer ask for your password.


Windows

For Windows, we recommend MobaXterm installer edition.

  1. Once installed open it, choose light or dark theme and click the Session button in the upper left.
  2. Choose SSH and enter amarel.rutgers.edu for Remote host, check the Specify username box and enter your NetID in the box and click OK.
  3. You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.
  4. In the future you can click Sessions (not Session) and select amarel.rutgers.edu and not have to enter your password.

Setting up your .bashrc

The main Amarel software setup by OARC does not include the software needed to compile and run ROMS. In order to use the software needed for running ROMS and other models, you will need to add a couple lines to the login script (.bashrc, .cshrc, etc.) in your home directory.

Unless otherwise requested your default shell will be bash. and the following two lines should be added near the top of your .bashrc:

export MODULEPATH=/projects/dmcs_1/sw/modulefiles/Core:${MODULEPATH} export SQUEUE_FORMAT=“%.18i %.9P %.8j %.8u %.2t %.10M %.10l %.4C %.6D %R”

The first line will tell Lmod where to find the modules that will load the custom software. The second line makes the squeue command (explained later) more useful. Once you have added these lines, log out and back in or source your .bashrc for them to take effect.