This tutorial is for Mac users. For Windows users, please first read the tutorial to install Git for Windows
, which ships with Git Bash
, then most bash commands in this tutorial will work in Git Bash
.
SSH client on MacOS.
Terminal
app. You can find Terminal
from LaunchPad
-> Other
, or from Spotlight Search
(type Terminal). For convenience, you can pin the Terminal program to the Dock.echo $SHELL
chsh -s /bin/bash
Connect to the teaching server. On MacOS Terminal:
ssh [USERNAME]@server.ucla-biostat-203b.com
Replace [USERNAME]
in the command by your actual user name (your email name in MyUCLA). If you cannot connect, you may not have an account. Ask TA or instructor for help.
Change password on teaching server
passwd
You can use git to obtain a copy of course materials:
git clone https://github.com/ucla-biostat203b-2021winter/ucla-biostat203b-2021winter.github.io.git
Install R v3.x.x or later. https://ftp.osuosl.org/pub/cran/
Install RStudio Desktop (Open Source Edition). https://rstudio.com/products/rstudio/#Desktop
Check whether git
command is available in Terminal. If not, follow instructions at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git Installing on macOS
section to install it.
git clone
and git pull
course materialsgit
installed, e.g., your Mac Terminal or teaching server, you can obtain the 203B course material by commandgit clone https://github.com/ucla-biostat203b-2021winter/ucla-biostat203b-2021winter.github.io.git
cd /PATH/TO/ucla-biostat203b-2021winter.github.io
then
git pull
If you have made changes to the local repo, then the two commits need to be merged.
File
-> New Project...
-> Version Control
-> Git
, then copy the git address (not HTTPS address) git@github.com:ucla-biostat203b-2021winter/ucla-biostat203b-2021winter.github.io.git
to the Repository URL:
.Open your browser and enter address http://server.ucla-biostat-203b.com:8787 to use RStudio on the teaching server. Log in using your credential for the teaching server.
ls -al ~/.ssh
If you donโt have ~/.ssh
folder, that means you have never used SSH before.
Tools
-> Global Options...
-> Git/SVN
. Using either method, make sure keys are in the default location ~/.ssh/
~/.ssh
folder should be 700 (drwx------)
.~/.ssh/id_rsa
should be 600 (-rw-------)
.~/.ssh/id_rsa.pub
should be 644 (-rw-r--r--)
.~/.ssh
folder can be 755 (drwxr-xr-x)
.~/.ssh/id_rsa
can be 644 (-rw-r--r--)
.~/.ssh/id_rsa.pub
can be 644 (-rw-r--r--)
.~/.ssh
.
~/.ssh
folder should be 700 (drwx------)
.~/.ssh/id_rsa
should be 600 (-rw-------)
.~/.ssh/id_rsa.pub
should be 644 (-rw-r--r--)
.authorized_keys
file should contain the public key (cannot duplicate) and its permission should be 600 (-rw-------)
.ssh [USERNAME]@server.ucla-biostat-203b.com