Connecting to the Brain Mapping Cluster

Daniel Tward, in Tutorials

Instructions to connect to bmap cluster


Step 1

Make sure you have open ssh installed on your system. From a terminal type:

ssh

It will print out usage information.

Step 2

In your home folder, you should have a folder named .ssh. If you don't have it you should create it:

cd ~
mkdir .ssh

(note that ~ will expand to your home directory)

Type

ls -a

to display the contents of the folder. -a means display all, even hidden folders. A hidden folder starts with a .. This means it is not displayed by default, it doesn't mean it is incrypted or secret in any way.

Step 3

In the .ssh folder, you check for a file named config. If you don't have it, create it, e.g.:

cd ~ (tilde means your home folder)
cd .ssh
touch config

Then you can edit the file using a terminal text editor like nano:

nano config

Step 4

Put an entry for brain mapping in your config file.

Host bmap
     HostName clgui.bmap.ucla.edu
     User your_user_name

(whitespace does not matter)

Save the file. In nano you can write out ^O or exit ^X and then get prompted to save.

Step 5

Check you can log in. Type:

ssh bmap
```  You will be prompted for your password.


# Step 6
Start setting up security keys so you don't have to type in your password.

In your `.ssh` folder check if you have the files `id_rsa` and `id_rsa.pub`.

If you don't have them, run the command:
```shell
rsa-keygen -t rsa
```  Do not type in a passphrase when prompted, leave it blank. Save it in the default location (which will be your `.ssh` folder).

[Read](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) about public/private keys in cryptography!  It's interesting.

# Step 7
Copy your public key to the brain mapping cluster.  Either, follow the tutorial [here](http://linuxproblem.org/art_9.html), or run the command:
```shell
ssh-copy-id bmap

Step 8

Double check you can log in without typing your password. Type

ssh bmap

Step 9

Check you havea home folder /ifshome/your_user_name

Check that you can access our shared data, /nafs/dtward.