SSH
In this course, we will be working on a server rather than on our personal computers, which I'll call "laptops" since most of you will have a laptop. If you happen to have a desktop, just treat the terms as synonyms.
Do to that, we have to use a network connection called SSH.
Terminology¶
Let's cover a little bit of terminology:
A server is a computer on the Internet that runs 24/7 and provides, uh, services to other computers (called "clients"). Your laptop is a possible client.
Servers usually don't have a monitor, a keyboard, a mouse or any of those things (peripherals) that your laptop has. They usually just have a processor, memory, disks and network cables. They're often mounted in racks with other servers. They might look like this:
(In fact, they might be virtual, meaning that software on a real, physical computer emulates the server. Virtual servers can be migrated from one physical host to another, if their original host needs to power down for maintenance or something.)
Tempest¶
The server we will be using in CS 304 is called tempest
. (The reason
it's called tempest
is a short, embarrassing story: we thought it was
just going to be a temporary name, and we didn't want to call it
temp
so we decided on tempest
. That was many years ago -- not so
temporary.) tempest
is a machine in the wellesley.edu
domain, so
its full name is tempest.wellesley.edu
. That name is an alias for
cs.wellesley.edu
.
In fact, tempest is a virtual server, running on some hardware that LTS owns.
Services¶
Tempest provides lots of services to clients over the network, which you can picture like this:
What kind of services? Things like:
- web services: Tempest hosts web pages, which means clients can request them and Tempest sends them the requested page. That's how you are reading this page.
- file services: Users can upload/download files using FTP clients like Fetch, CyberDuck or WinSCP (you probably did that in CS 111)
- ssh: today's topic
Using SSH¶
We can and will use SSH in several distinct ways:
- VS Code. When we use the Remote Development extension to VS Code, it uses SSH behind the scenes. It uses SSH to connect to Tempest, allowing you to login and run a shell on Tempest. VS Code also installs some software to help mediate the communication between Tempest and VS Code running on your laptop. That mediation includes allowing you to edit files that are on Tempest, using the VS Code running on your laptop. It's very cool.
- The ssh command. There are a handful of things you'll have to do that involve running the SSH command on your laptop, instead of via VS Code. I'll describe that when we get to it in the course (which will be quite soon, but not the first day); you don't have to read the linked information until then.
- SSH Tunnels. We'll use that later in the course, when we want to connect our laptop's web browser to our web applications. You can wait to read that.
Reason¶
Why do we have to work on the server? The main reason is that when we create our web applications, the files have to be on Tempest and the processes have to be running on Tempest. Tempest also hosts our database software, so we access that data directly by running our Python programs on Tempest. Essentially, our laptop is only providing a keyboard, monitor and mouse: all the real work is happening on Tempest
Conclusion¶
That's it for now. We'll use SSH a zillion times this semester, so plan to get comfortable with this. Soon, we'll learn a way to streamline our use of SSH and avoid having to type our password a zillion times.