This is an old revision of the document!
Table of Contents
Logging into the Astronomy Cluster
For desktops - normally you will log into a machine directly from a keyboard and monitor attached to the machine. If you want to log in from a remote location like home or another institution, note that we only allow external logins via the SSH protocol. Most Unix machines have the SSH command installed, and SSH software is available for Windows (PuTTy) and Mac machines as well.
By default, however, direct access to all of the Linux machines except the server, astronomy, is closed off to all outside machines except for the Apache Point Subnet; this is done to help to improve security. You can always log into astronomy from other locations, and if necessary, log into other cluster machines from astronomy.
For example, if you wanted to log into praesepe from a remote location you would be unable to. First, you would need to log into the server astronomy, then from there log into the desired machine.
SSH Instructions
'NOTE
' - These SSH instructions are for Linux / UNIX (Mac) machines. If you are connecting via command line from a Windows machine, you will need to use PuTTy (see below)
The basic command to SSH into the astronomy server is as follows:
ssh username@astronomy.nmsu.edu
You will then be required to provide your password for access. Once you do, you will be at your home directory on the astronomy server.
From here, you are now able to access the other machines which are one the astronomy cluster, this can be done via an another SSH command, for example, to log into praesepe -
ssh username@praesepe.nmsu.edu
Some of the users like using the option -X with SSH which will enable X11 forwarding. If you are curious about the powers of SSH options - https://www.ssh.com/academy/ssh/command
Logging in using SSH keys instead of passwords
If you find yourself logging into multiple machines often / daily, you might find it convenient to set up log-ins via SSH keys. Do note, this is optional and normal SSH logins will normally take care of 99% of users.
You can always log in using your password, however; if you prefer you can also log in using an SSH key, which has certain advantages. The SSH protocol allows the use of key pairs for login authentication. There are at least two flavors of SSH, which use different formats for the key pairs. Since mid-2004, we have been using OpenSSh. (As of late 2004, APO is using the other flavor).
To generate a key pair, use the command
Ssh-keygen -t dsa
Which will create two files in the .ssh subdirectory under your home directory called id_dsa and id_dsa.pub; it will also prompt you to enter a passphrase to use with the key pair. The .pub file is public and can be copied to other machines; the other file SHOULD never be shared.
If you ssh to log into another machine using the SSH key: If the remote machine is using OpenSSH, append the contents of the id_dsa.pub file to the .ssh/authorized_keys2 file on the target machine. If the remote machine is using the other SSH flavor, you first need to convert your public key using: Ssh-keygen -e -f id_sa.pub > newname.pub Then copy the converted key to the .ssh2 directory of the remote machine. You will also need to add the name of the .pub file into the .ssh2/authorization file on the remote machine Once this is done, when you use SSH to connect to the machine, it will prompt you for the passphrase associated with your key.
If you want to come from a machine running the other flavor of SSH into our machine, you can convert that SSH format key into our format using ssh-keygen -i -f name.pub on the OpenSSh machine (our), and then use the converted key.
You can register your passphrase for a session to avoid having to repeat typing it by using ssh-add, which will prompt you for the passphrase. If you are doing this from a remote log in session (as opposed to directly logged onto your workstation, you will need to first start a session with th SSH agent using: ssh-agent shell (where shell is the name of your preferred shell, e.g., tcsh or bash). After you register your passphrase, any SSH operation which would have required you to entr yor passphrase will automatically use the one you entered with ssh-add. This can make multiple uses of SSH very convenite, but beware, it also would allow someone else who happened to come inot your office the capability of loggin ginto some other machine without knowing your password!
To set up your SSH key for a session to prevent having to re-enter it:
ssh-agent tcsh ssh-add (enter passphrase)
Log In from Windows Machines
Recent versions of Windows have ssh available in a PowerShell window, which you can use as above.
If you want to be able to do X11 forwarding (i.e., to open display windows), install VcXsrv first. Then start VcXsrc using XLaunch. In powershell window, enter $env:DISPLAY = “localhost:0”. Then do the ssh command as above.
Using PuTTy (older)
If you have a Windows computer you can also use PuTTy to SSH into the astronomy cluster. PuTTy is an Open Source SSH client for Windows. You will first need to download it at - https://www.putty.org/
Once download, open up PuTTy - you will need to change the hostname, but the rest of the defaults should be fine (do double check the ones listed below!)
Hostname:
astronomy.nmsu.edu
Port:
22
Connection Type:
SSH
Then click “Open”. This will take you to a terminal and will ask you who you wish to log in as. Enter your astronomy username and hit enter. It will then ask you for your password. Once entered, you will then be connected to astronomy through a PuTTy terminal - from this point, you can use Linux / UNIX commands as normal and is no longer a Windows CMD Prompt.
Possible SSH Issues
After OS Upgrades you may get this error:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is STRINGOFSTUFF: abcdefghijklmnopqrstuvwxyz Please contact your system administrator. Add correct host key in /path/to/user/home/.ssh/known_hosts to get rid of this message. Offending RSA key in /path/to/user/home/.ssh/known_hosts:4 RSA host key for orion has changed and you have requested strict checking. Host key verification failed.
To solve this, you can edit your known_hosts file in /path/to/user/home/.ssh/ dir with the command:
vi /path/to/user/home/.ssh/known_hosts
And remove the offending key (HINT! - in the error message it says line 4 was the offending key, remove that line, and only that line). Once it is removed, try logging in again!
List of Machines in the Astronomy Cluster
Desktops:
achernar acrux aldebaran alphaboo altair antares arcturus babylon bellatrix betelgeuse boomerang canopus capella castor denebola fomalhaut gacrux hadar kermodei kochab matrix mimosa mintaka oort orion phoebe polaris pollux regulus rigel spica tequila vega wasp zenith
GPU graphics processer:
astrogpu
Multi-core machines / servers:
hyades milkyway (ask holtz for use) praesepe virgo
Solar Group machines (need permission from James):
solarstorm (currently under maintenance) ssoc