Skip to content

Instructions: Getting set up on the HPC

Taylor Salo edited this page Feb 21, 2022 · 2 revisions

Customizing config files on the HPC

Here are some good standards for personalizing your .bashrc and .bash_profile files on the HPC.

.bashrc: Colorize and format your ls

alias ls='ls --color -h --group-directories-first'
LS_COLORS='fi=93:di=37;1:ln=31;1:*.m=95:*.py=34:*.sh=92'; export LS_COLORS

.bashrc: Change your default file permissions

You want to make sure your lab will be able to read and edit files you create in shared folders.

umask u=rwx,g=rwx,o=r

.bashrc: Give yourself automatic access to environments

Source your lab's centralized projects file:

source /home/data/nbc/nbclab-env/.projects

And add a prefix to denote which environment is loaded:

prompt1="\[\e[1;39m\]\u@\h:\W\$\[\e[0m\]"
PROMPT_COMMAND='PS1="\[\e[1;33m\]${project_name}\[\e[0;0m\]${prompt1} "'

Setting up SSH keys for your local machine

This will allow you to SSH onto the HPC without having to type in your password. (Note: the following instructions are adapted from this resource).

First, generate authentication keys for your laptop. In your laptop terminal (i.e., not SSHed onto the HPC):

ssh-keygen -t rsa

Just hit Enter for the filename and password (so there is no password).

Now add your laptop's public key to the list of authorized keys on the HPC:

cat .ssh/id_rsa.pub | ssh [username]@hpclogin02.fiu.edu 'cat >> .ssh/authorized_keys'

Remember to replace [username] with your username!

Now you should be able to SSH onto the HPC without typing in your password.

Create an alias for SSHing from your laptop

In your .bash_profile or .bashrc on your laptop, add the following:

alias hpc1="ssh [username]@hpclogin01.fiu.edu"
alias hpc2="ssh [username]@hpclogin02.fiu.edu"

Setting up git on the HPC

Note: This is under development. These steps do not work perfectly for everyone, and we want to adjust the instructions so that they're right. If you follow the instructions and need to tweak anything, please do.

  1. Sign up for a GitHub account
    • If you want to be able to create and use free private repositories, you can request an education discount either for your personal account or for your lab's organizational account.
  2. Set up git for your account on the HPC
    • Perform steps 2-4 in Setting up Git.
  3. Set up your ssh key
    • Remember to make your passkey easy to remember (you will be typing it a lot)
    • Follow steps 1 & 2 in 'github:help'.
    • cat ~/.ssh/id_dsa.pub or cat ~/.ssh/id_rsa.pub
    • Copy the key to your GitHub account settings --> SSH Keys --> add SSH key
  4. Modify your ~/.ssh/config file using nano
    1. Test if SSH over the HTTPS port is possible. Run this SSH command: ssh -T -p 443 [email protected]
    2. You should see:

      Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.

    3. Enable SSH connections over HTTPS: nano ~/.ssh/config
      1. Add the following lines:

        Host github.com
        Hostname ssh.github.com
        Port 443

  5. Now you should be able to use git on the HPC.

Git Tutorials

Here are some great GIT tutorials: