Sometimes OIT containers may be updated/restarted for one reason or another and prevent you from logging into the container! When trying to ssh in, you may see something that looks like:
Depending on your operating system, please use the following command/procedure to fix the issue. After running the correct command, try ssh-ing in again. If it asks for a password, repeat the procedure for copying keys that you early performed.
Mac/Linux Users:
grep -v '\[cs-az-00.*' ~/.ssh/known_hosts >| ~/.ssh/known_hosts
Windows Users:
Open a terminal/shell. We have to open a file in notepad, after which you must delete a few lines from the file. Type the following lines into your shell.
Notepad ~/.ssh/known_hosts
Find any line in the file that starts with '[cs-az-00...' and delete it from the file without changing the other lines.
If you have an Intel x86_64 processor you can run a container locally and not use the OIT remote container. The following outlines the steps:
Install docker on your local machine (laptop or desktop). Download docker desktop for your machine.
Create a directory/folder on your local machine for Compsci 210.
Download this Docker file and place it into your just created 210 directory.
Change directory into your 210 directory.
Type the command docker build -t dev210 . to create a container image (Note the . after the dev210 that indicates the current directory).
Start the container with an interactive bash shell using
docker run --name cs210 --mount type=bind,source=<local container directory>,destination=/cs210 -it dev210 bash where <local container directory > is the directory you created above. For example I use ~/Containers/210 for my directory and thus run the following command.
docker run --name cs210 --mount type=bind,source=/Users/alvy/Containers/210,destination=/cs210 -it dev210 bash to start the container and start an interactive bash shell (Dockerfile should be in the directory specified by the source argument).
In the container terminal/shell you will notice the directory /cs210 and if you list that directory it contains the same files as your local machine 210 directory. Try it by creating a file in that directory on your host machine and will be visible on your container. This will be useful when we get to git and programming since you will run git in a local terminal but do programming compiling in the container.
We will have to do something a little different for one project later in the semester. We will provide instructions on that later.