Stanford PSYCH 290

Natural Language Processing & Text-Based Machine Learning in the Social Sciences

Instructions to setup ssh keys on your machine

Each of you should have received your ssh key-pair on slack which you will use to authenticate yourself to our AWS server and encrypt all your communications with the server. I have setup accounts for you all on the server already.

What Do I Need To Know

The file id_rsa is your private key and id_rsa.pub is your public key. You reveal your public key to others and keep you private key confidential. Anyone who knows your public key can communicate with you securely. Our AWS server already has your public key and should be able to verify your identity when you login. Each one of you has your own home directory located at /home/<sunet-id>. When you login, you will land in this directory. You can use this directory to keep your data, results and code. Other users will not be able to edit your files here. The directory /shared/data is a shared directory which you can use to share data/code/results with others.

What Should I Do

Download the files id_rsa and id_rsa.pub from slack to the directory Downloads.

Open Terminal by searching ‘terminal’ in your mac’s spotlight search.

Navigate to your home directory:

cd

On your laptop/desktop, create a directory /home/<username>/.ssh if one doesn’t already exist:

mkdir -p .ssh

Move the files id_rsa and id_rsa.pub into the directory /home/<username>/.ssh:

mv ~/Downloads/id_rsa* ~/.ssh

Disallow others to access your private key by setting its permissions:

chmod go-rwx ~/.ssh/id_rsa

At this point, you are ready to login to our AWs server:

ssh <sunet-id>@aws_server

where aws_server is our server name.