If at any point you get stuck during this initial setup or throughout the semester, please don’t hesitate to email the course staff at 15-131-staff at cs dot cmu dot edu.
SSH is a program that lets you log in to a server and run commands on it. At CMU, you’ll use SSH extensively in most of your CS classes. SSH is also a very important tool for working in industry and knowing how to use it will be essential throughout your career. (Even in academia, SSH is a very important tool.)
Throughout the rest of the semester we’ll teach you about how to use it and why you want to, but for now we’ll just focus on getting it set up so that you can start using it right away.
The exact instructions on how to set up SSH vary based on what operating system you’re using, so choose the relevant section and proceed from there.
Once you’ve chosen a terminal for your operating system, you can set up an optional shortcut to save some typing.
NOTE: We need to make these changes before running any SSH command, or before launching any SSH session. On OS X and Linux, this means make sure you do these instructions immediately after opening a new terminal window or tab. On MobaXterm, you should verify that you see an image similar to this.
We’re going to edit the ssh config file. Use the following command to do that (you don’t need to understand this command yet–we’ll cover it later in the semester). Copy and paste the command into your terminal and hit enter.
Add the following (replacing
ANDREWID with your Andrew ID) to this file, save
the file, and exit nano. (Some notes: The
^ character is used to represent
the “control” key, so
^O means “hold control and press the O key”, and nano
uses “WriteOut” to mean “save”. Nano will ask you to confirm the filename you
want to save. Just hit enter to confirm it.)
Host andrew Hostname unix.andrew.cmu.edu User ANDREWID GSSAPIAuthentication yes GSSAPIDelegateCredentials yes
You should now verify that SSH works with your chosen terminal. You will always be asked for a password when SSH’ing in–it’s the same password you use to log onto WebISO.
If you did the optional setup above to set up the shortcut, you can alternatively run
(Note: it’s literally ‘andrew’, not your Andrew ID).
The default settings for the command line and other programs you’re likely to use during the semester are rather minimal, so we’ve written some configuration files that will give you nicer defaults. Of course, if you want to change these settings to better fit your preferences you can do so.
SSH in to
First, we’ll get a few basic files. Copy the following commands into your terminal, hitting enter after each one.
Then, disconnect from Andrew (remember,
^D) and log in again. When you’ve
logged in, if you see something like
username@unixN:~$ instead of what the
prompt used to be, you’re done! If you see a file path, then everything went
correctly! (If it looks like nothing changed, something went wrong. Try logging
out and back in, and if that doesn’t fix it, make a post on Piazza or email us.)