-
Notifications
You must be signed in to change notification settings - Fork 3
Instructions: Getting set up on the HPC
Here are some good standards for personalizing your .bashrc and .bash_profile files on the HPC.
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
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
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} "'
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.
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"
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.
-
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.
-
Set up git for your account on the HPC
- Perform steps 2-4 in Setting up Git.
-
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
orcat ~/.ssh/id_rsa.pub
- Copy the key to your GitHub account settings --> SSH Keys --> add SSH key
-
Modify your ~/.ssh/config file using nano
- Test if SSH over the HTTPS port is possible. Run this SSH command:
ssh -T -p 443 [email protected]
- You should see:
Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.
- Enable SSH connections over HTTPS:
nano ~/.ssh/config
- Add the following lines:
Host github.com
Hostname ssh.github.com
Port 443
- Add the following lines:
- Test if SSH over the HTTPS port is possible. Run this SSH command:
- Now you should be able to use git on the HPC.
Here are some great GIT tutorials:
- NYUCCL
- FPerez
- Codecademy (interactive)