---
# System prepended metadata

title: Guide to Setting Up Remote Development for MPCS51042

---

# Guide to Setting Up Remote Development for MPCS51042

## Part 1: GitHub and SSH Setup

1. First, you have to sign up or login to your GitHub
2. Generate SSH key for GitHub:
   - Open terminal on your local machine or MPCS Unix terminal, whichever you want to generate your SSH key so as to make GitHub recognize your machine
   - In this case, I recomand to use SSH MPCS 
   - Run: `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"`
   - Press Enter to save in the default location
   - Set a passphrase if desired

2. Add SSH key to GitHub:
   - Copy the public key: `cat ~/.ssh/id_rsa.pub`
   - Go to GitHub Settings > SSH and GPG keys > New SSH key
   - Paste your key and save

3. Test GitHub connection:
   - Run: `ssh -T git@github.com` at local or MPCS terminal
   - You should see a success message

## Part 2: Accept and Clone the Assignment

1. Accept the assignment:
   - Click the link: https://classroom.github.com/a/ItQBGL0K
   - This creates your personal repository for the assignment

2. Clone the repository:
   - In your terminal, navigate to your preferred directory
   - Run: `git clone git@github.com:uchicago-2024-mpcs51042/pa-0-your-username.git` (That is, select SSH tab of code clone square)
   - Replace 'your-username' with your actual GitHub username

## Part 3: Set Up Remote SSH in VSCode

1. When use SSH connect as the professor suggest, if you want to develop and test code in local, for me, it is more easy if there is IDE to use. In my case, I use VScode for my development habit, so I use it as demo template
2. Install Remote-SSH extension:
   - Open VSCode
   - Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
   - Search for "Remote - SSH" and install it

2. Configure SSH:
   - Create/edit ~/.ssh/config file
       - run `nano ~/.ssh/config` in terminal (notice: at the same place, local or MPCS machine which you generate keys)
   - Add the following in config file:
     ```
     Host mpcs51042
       HostName mpcs51042-0.cs.uchicago.edu
       User your-username
       IdentityFile ~/.ssh/id_rsa
     ```
   - Replace 'your-username' with your school username

3. Connect to remote server:
   - In VSCode, click the icon in the bottom-left corner of VSCode that looks like "><" or says "Open a Remote Window"
   - Choose "Connect to Host..." and select "mpcs51042"
   - Enter your password when prompted in the upper search bar

4. Open your cloned repository:
   - In the remote VSCode window, go to File > Open Folder
   - Navigate to your cloned repository folder and open it

