How do I connect?

General Overview:

We have three High Performance Computing (HPC) systems on campus. Mio, Mc2 (Energy), and AuN (Golden). Note: Mc2 is currently not powered on and is unavailable. This document describes how to log on to these systems, once you have been granted an account. For information about how to get an account see How do you get an account.

After you have logged in please see How do I do a simple build and run to see how to build and run applications.

The only way to access the HPC platforms is by using ssh. Unix and Unix-like operating systems, (OSX, Linux, Unicos...) have ssh built in. If you are using a Windows-based machine then you must use a terminal package that supports ssh, such as Cygwin or puTTY. We have a description of how to connect using puTTY from a Windows-based machine at: http://geco.mines.edu/ssh.

All of the HPC platforms are behind the campus firewall. The firewall blocks access from off campus. Thus you need to be on campus to get access, or you need to use VPN software discussed at VPN INFORMATION. There is a third method for gaining access discussed below under the section Setting up keys to make your life much easier. This method will allow you access for a fixed period of time without needing to reenter your password; transparently tunneling to AuN and Mc2.

Assuming you are on campus and you are using a machine that supports ssh directly, you can get to Mio or AuN by entering the following in a terminal window:

ssh mio.mines.edu

or

ssh aun.mines.edu

You will be asked for your password. The password required here is your MultiPass password. The session should look like the following with "joeuser" replaced with your username and "petra" replaced with the name of the machine from which you are connecting.

Mio

[joeuser@petra ~]$ ssh mio.mines.edu
joeuser@mio.mines.edu's password: 
*****************************
** For Mio questions email **
**    hpcinfo@mines.edu    **
*****************************
[joeuser@mio001 ~]$ 

AuN

[joeuser@petra ~]$ ssh aun.mines.edu
joeuser@mio.mines.edu's password: 
*****************************
** For AuN questions email **
**    hpcinfo@mines.edu    **
*****************************
[joeuser@aun ~]$ 

Setting up keys to make your life much easier:

Using ssh keys might make your life easier. This can work from both on campus and off. Also, the procedure discussed below will allow you to log in only entering a passphrase every 8 hours.

The following is a quick guide for setting up keys and tunnels to access aun.mines.edu, and mio.mines.edu from an on campus Linux box, OSX (Mac) machine, or using Cygwin. The commands you will enter are shown in red. The procedure for setting up off campus access via tunneling is similar but the configuration file is different and there is an extra step. This is documented below. Note: Non-CSM people are not allowed to tunnel into campus and must use VPN. After VPN is set up off campus users can use the procedure outlined for on campus usage.

Also, for Windows users who don't use Cygwin, information on setting up PuTTY and tunneling with PuTTY can be found at http://geco.mines.edu/ssh/ and
http://howto.ccs.neu.edu/howto/windows/ssh-port-tunneling-with-putty

Setting up access from an on campus using Cygwin, Linux or an OSX box:

Generate your key pair (do not use an empty passphrase):

osage:~ joeuser$ ssh-keygen -f $HOME/.ssh/forbluem -tdsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/joeuser/.ssh/forbluem.
Your public key has been saved in /Users/joeuser/.ssh/forbluem.pub.
The key fingerprint is:
67:60:3c:5e:42:64:23:c5:79:70:62:d1:da:74:97:45 joeuser@osage.mines.edu
The key's randomart image is:
+--[ DSA 1024]----+
|      .+@=.    +E|
|       *o++ . o  |
|        *=.. .   |
|       o.=.      |
|        S o      |
|         o       |
|                 |
|                 |
|                 |
+-----------------+
osage:~ joeuser$ 

Copy the public key to AuN:

If you have an account on AuN then you will want to copy your new key there.

[joeuser@petra ~]$ cat ~/.ssh/forbluem.pub | ssh aun.mines.edu "cat >> ~/.ssh/authorized_keys"

Copy the public key to Mio:

If you have an account on Mio then you will want to copy your new key there also, allowing you to log in using the same key.

[joeuser@petra ~]$ cat ~/.ssh/forbluem.pub | ssh mio.mines.edu "cat >> ~/.ssh/authorized_keys"

Add the following lines to your ~/.ssh/config file. Create one if it does not exist. Replace joeuser with your Mines' username.

#Next 5 lines are optional if you don't do X-Windows.  The location of XAuthLocation might be different.
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
XAuthLocation /Users/joeuser/.Xauthority
#XAuthLocation /opt/X11/bin/xauth
ServerAliveInterval 60
PubkeyAcceptedKeyTypes=+ssh-dss
AddKeysToAgent yes 

Host mio
HostName 138.67.132.244
User joeuser
Identityfile2 ~/.ssh/forbluem

Host aun
HostName aun.mines.edu
User joeuser
Identityfile2 ~/.ssh/forbluem


Note: You can run the following command on your local machine to get a copy of this template.


curl http://geco.mines.edu/prototype/How_do_I_connect/config_template -o config_template


Set the permissions on your config file:

chmod 600 ~/.ssh/config

Run the following to set an 8-hour limit on your key:

ssh-add -t 28800 ~/.ssh/forbluem

Log in to Aun or Mio using ssh:

ssh mio001

This time you should not need to enter a password.


Setting up access from an on off campus when using Cygwin, Linux or an OSX box:

Generate your key pair on your remote machine (do not use an empty passphrase):

petra:~ joeuser$ ssh-keygen -f $HOME/.ssh/forbluem -tdsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/joeuser/.ssh/forbluem.
Your public key has been saved in /Users/joeuser/.ssh/forbluem.pub.
The key fingerprint is:
67:60:3c:5e:42:64:23:c5:79:70:62:d1:da:74:97:45 joeuser@osage.mines.edu
The key's randomart image is:
+--[ DSA 1024]----+
|      .+@=.    +E|
|       *o++ . o  |
|        *=.. .   |
|       o.=.      |
|        S o      |
|         o       |
|                 |
|                 |
|                 |
+-----------------+
petra:~ joeuser$ 

Copy the public key to jumpbox and set the permission for the keys file:

[joeuser@petra ~]$  cat ~/.ssh/forbluem.pub | ssh jumpbox.mines.edu "cat >> ~/.ssh/authorized_keys"
[joeuser@petra ~]$  ssh jumpbox.mines.edu "chmod 600 ~/.ssh/authorized_keys"

Add the following lines to your ~/.ssh/config file. Create one if it does not exist. Replace joeuser with your Mines' username.

Replace "joeuser" with your Mines' username.

#Next 5 lines are optional if you don't do X-Windows.  The location of XAuthLocation might be different.
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
XAuthLocation /Users/joeuser/.Xauthority
#XAuthLocation /opt/X11/bin/xauth
ServerAliveInterval 60
PubkeyAcceptedKeyTypes=+ssh-dss
AddKeysToAgent yes 

Host MIO_r
Hostname mio.mines.edu
User joeuser
ProxyCommand ssh jumpbox.mines.edu -W %h:%p
Identityfile2 ~/.ssh/forbluem

Host AUN_r
Hostname aun.mines.edu
User joeuser
ProxyCommand ssh jumpbox.mines.edu -W %h:%p
Identityfile2 ~/.ssh/forbluem


Host jumpbox.mines.edu
Hostname jumpbox.mines.edu
User joeuser
Identityfile2 ~/.ssh/forbluem
#ControlMaster auto
#ControlPath   /Users/joeuser/.ssh/tmp/%h_%p_%r

Note: You can run the following command on your local machine to get a copy of this template.


curl http://geco.mines.edu/prototype/How_do_I_connect/config_long_template -o config_template


Run the following to set an 8-hour limit on your key:

ssh-add -t 28800 ~/.ssh/forbluem

This command should be run as needed to renew your key. You will enter the passphrase that you used to set up the key.

Log in to jumpbox using ssh:

ssh jumpbox
Copy your key from jumpbox to Aun and/or Mio.

Copy the public key to Mio. You should not need to set the permissions.

[joeuser@petra ~]$ cat ~/.ssh/forbluem.pub | ssh mio.mines.edu "cat >> ~/.ssh/authorized_keys"
[joeuser@petra ~]$ ssh mio.mines.edu "chmod 600 ~/.ssh/authorized_keys"

Do the same thing for AuN.

You should now be able to ssh directly to Mio or AuN from off campus using the capitalized machine names, AUN and/or MIO.


[joeuser@petra ~]$ ssh MIO_r
Last login: Thu Jul  5 11:58:57 2018 from 138.67.123.231
[joeuser@mio001 ~]$