Control a Computer Without Sitting in Front of It — SSH
Networks, client-server computing and protocols
Imagine putting a Raspberry Pi in the loft.
Perhaps it is connected to a temperature sensor. Perhaps it is running a web server, monitoring your network, collecting weather data or controlling some piece of equipment.
There is just one problem.
Every time you want to change something, do you really have to climb into the loft carrying a keyboard and monitor?
Of course not.
You can sit at another computer — or even use an iPad — and control the Raspberry Pi remotely.
The technology that makes this possible is called SSH, and experimenting with it is a particularly good way of turning several rather abstract Computer Science topics into something real.
What Is SSH?
SSH stands for:
Secure Shell
It is a network protocol that allows one computer to communicate securely with another computer.
Most commonly, it allows you to open a command-line session on a remote computer.
For example, I might have:
Computer A: Windows PC in my study
Computer B: Raspberry Pi elsewhere in the house
Both machines are connected to my home network.
Instead of attaching a keyboard, mouse and monitor to the Raspberry Pi, I can type commands on the Windows computer and have those commands executed by the Raspberry Pi.
Conceptually, we have:
Windows PC or iPad
↓
SSH client
↓
Network
↓
SSH server
↓
Raspberry Pi
This immediately introduces an important Computer Science concept.
The two computers are performing different roles.
The computer from which I initiate the connection is the client.
The Raspberry Pi accepting the connection is the server.
Client and Server Do Not Mean Big and Small Computers
This is an important misconception.
When students hear the word "server", they sometimes imagine a huge computer sitting in a data centre.
A server does not have to be a particularly powerful computer.
It describes a role.
A server provides a service to another computer.
A client requests that service.
My Raspberry Pi can therefore be an SSH server.
My powerful desktop PC can be its client.
Interestingly, those roles could reverse for another application.
The terms describe what the computers are doing, not how powerful they are.
A Practical Experiment
This is a lovely experiment because it needs surprisingly little equipment.
You could use:
a Raspberry Pi;
a Windows or Linux computer;
a home network;
optionally an iPad or another computer.
Initially, I would place the Raspberry Pi beside the main computer.
That makes configuration much easier.
Once everything works, move it somewhere else.
That is when the experiment suddenly becomes much more convincing.
Step 1 — Make Sure SSH Is Enabled
On a Raspberry Pi running Raspberry Pi OS, SSH can be enabled through the system configuration tools.
It is sensible to make sure the Pi is fully updated and that the user account has a strong, unique password before allowing remote access.
The important point is that the Raspberry Pi now has software listening for SSH connections.
It has become an SSH server.
Step 2 — Find the Raspberry Pi on the Network
Every device communicating using Internet Protocol needs an IP address.
On a typical home network you might see an address such as:
192.168.1.42
The exact number will depend upon the network.
Already we have connected our little practical exercise with an important syllabus topic:
IP addressing.
The IP address identifies the device on the network so that network traffic can be directed towards it.
Students sometimes learn about IP addresses as though they are simply strings of numbers that have to be remembered for an examination.
SSH provides a reason for actually needing one.
I need to tell my computer:
Which machine do you want to contact?
The IP address provides that information.
Step 3 — Connect From Another Computer
Suppose my Raspberry Pi has the address:
192.168.1.42
and my username on it is:
philip
From a terminal I could enter:
ssh philip@192.168.1.42
The first time I connect, SSH may ask me to confirm the identity of the remote computer.
I can then authenticate myself.
Once connected, something rather wonderful has happened.
The terminal sitting in front of me is now controlling a completely different computer.
If I enter:
pwd
the command runs on the Raspberry Pi.
If I enter:
ls
I see files stored on the Raspberry Pi.
If I enter:
hostname
the answer comes from the remote machine.
The keyboard may be sitting beside me.
The computer executing the instructions could be on the other side of the building.
Try This Experiment
One of the simplest ways of demonstrating this is to deliberately separate the two computers.
First connect to the Raspberry Pi while it is beside you.
Then shut it down properly, move it to another room and reconnect it to the network.
Now return to your main computer.
Connect using SSH.
Run:
hostname
Then:
uptime
Then:
ls
You are controlling a computer you cannot see.
For students encountering remote administration for the first time, that can be a surprisingly powerful moment.
Now Try It From Windows
Modern Windows systems include an SSH client, so you can use Windows Terminal or PowerShell.
The principle is exactly the same:
ssh username@IP-address
This makes for another useful teaching point.
The two computers do not need to be running the same operating system.
A Windows machine can communicate with a Linux machine because both understand the agreed network protocols.
That is enormously important.
Networks work because machines agree on standards and protocols, not because every machine runs identical software.
What About an iPad?
This makes the demonstration even more interesting.
With a suitable SSH client application, an iPad can also become the client.
So I could potentially be sitting elsewhere in the house holding an iPad while administering a Raspberry Pi.
The iPad does not somehow become a Raspberry Pi.
It is simply providing the interface through which I communicate with the remote machine.
The Raspberry Pi is still executing the commands.
This is another excellent illustration of client-server computing.
What Is Actually Travelling Across the Network?
This is where we can go beyond simply using SSH and start thinking like Computer Science students.
Suppose I type:
ls
Those characters need to travel across the network.
The remote computer receives the command.
It executes it.
The resulting text then travels back across the network.
So we can imagine:
Client
→ command
→ network
→ server
and then:
Server
→ response
→ network
→ client
This is happening through a collection of networking protocols.
SSH itself normally operates using TCP.
That is useful because a remote terminal needs reliable communication.
If characters disappeared randomly while I was typing commands, remote administration could become rather interesting!
TCP provides mechanisms for reliable, ordered delivery.
Ports — Which Service Do You Want?
There is another problem.
The Raspberry Pi might be providing several network services simultaneously.
It might be:
hosting a website;
accepting SSH connections;
sharing files;
running a database;
collecting sensor information.
The IP address tells us which computer we want.
But we also need some way of identifying the service.
This is where port numbers become useful.
SSH conventionally uses:
TCP port 22
A useful simplified model is therefore:
IP address = which machine?
Port number = which service on that machine?
That is not the complete technical story, but it is an excellent starting model.
Why Is It Called Secure Shell?
There were older methods of remotely controlling computers that did not adequately protect communications.
That creates an obvious problem.
Imagine sending a password across a network as easily readable text.
Anyone able to intercept the traffic might potentially read it.
SSH was designed to provide secure remote communication using cryptography.
The connection is encrypted.
That means somebody examining intercepted network traffic should not simply see your commands and passwords written in ordinary readable text.
This leads naturally into another major area of Computer Science:
encryption and cybersecurity.
Authentication — How Does the Pi Know It Is Me?
A secure connection is not much use if absolutely anybody can establish one.
The server therefore needs some method of authentication.
A simple approach uses a username and password.
However, SSH can also use public-key authentication.
This introduces asymmetric cryptography.
A user can have a pair of related keys:
private key — kept secret;
public key — placed on systems to which the user needs access.
The mathematics allows the server to verify that the connecting client possesses the appropriate private key without the private key itself having to be sent across the network.
This is a much deeper topic, but SSH provides a practical reason for studying it.
Cryptography is no longer merely an examination definition.
It is protecting the computer you are actually using.
A Better Experiment — Make the Raspberry Pi Headless
Now remove the Raspberry Pi's monitor, keyboard and mouse completely.
This is called running it headless.
All it really needs might be:
power;
a network connection.
You can now administer it remotely.
This is how many real servers operate.
Walk into a data centre and you do not expect every server to have its own monitor, keyboard and mouse permanently attached.
Remote administration is fundamental to modern computing.
What Could the Raspberry Pi Actually Do?
Once students understand SSH, the Raspberry Pi can become much more than a small computer sitting on a desk.
It could become a:
Web server
Host a small website.
File server
Store files accessible to other computers.
Weather station
Collect temperature, pressure, humidity or rainfall data.
Astronomy computer
Control equipment or collect observational data.
Home monitoring system
Record environmental measurements.
Programming server
Write and run Python or C++ programs remotely.
Network experiment platform
Investigate networking concepts on a real machine.
This is why learning Linux and networking together can become so interesting.
One small computer can provide many different services.
A Particularly Good Student Challenge
Once the basic connection works, I would give students a challenge:
Can you prove which computer is actually executing the commands?
Do not simply tell them.
Ask them to devise tests.
They might try:
hostname
or:
uname -a
or examine files that exist only on one machine.
This changes the activity from following instructions into an investigation.
That distinction matters.
Computer Science should not simply be:
Type these commands because I told you to.
It should become:
What experiment could you perform to prove what is happening?
Take the Experiment Further — Run a Program Remotely
Create a tiny Python program on the Raspberry Pi.
For example:
print("This program is running on the Raspberry Pi")
Then execute it through the SSH session.
The screen displaying the result may be your Windows computer.
The program itself is running somewhere else.
Now imagine replacing that tiny program with something more substantial.
Perhaps it reads a temperature sensor every minute.
Perhaps it records data.
Perhaps it operates continuously for several weeks.
You no longer need to sit beside it.
That is when the Raspberry Pi starts behaving much more like a genuine server.
An Even Better Experiment — Disconnect
Start a simple task remotely.
Then close the SSH connection.
What happens?
This introduces another important distinction.
SSH provides access to the remote computer, but processes running on that computer are still managed by its operating system.
Students can then investigate tools designed for persistent terminal sessions or background services.
Suddenly operating systems, processes, networking and servers begin connecting together.
That is exactly the sort of wider understanding I want students to develop.
What Happens If the Network Fails?
Disconnect the Raspberry Pi from the network.
Try SSH again.
It fails.
Why?
The Raspberry Pi itself may be working perfectly.
SSH may be configured perfectly.
The client may be working perfectly.
But communication between them has been lost.
This creates a useful troubleshooting model.
When a network service fails, ask:
Is the server running?
Is the server connected to the network?
Does it have the expected IP address?
Can the client reach that address?
Is the required service running?
Is the appropriate port accessible?
Is authentication succeeding?
This is much more useful than randomly changing settings until something starts working.
A Note About Security
SSH is extremely useful, but remote access should always be treated seriously.
For a classroom or home experiment, I would initially keep the Raspberry Pi accessible only from the local network.
Do not casually expose SSH directly to the public Internet.
Use strong authentication, keep software updated and understand what a firewall or router configuration is doing before changing it.
There is an important lesson here.
Being able to make something work is only half of computing.
The other question is:
Have I made it work securely?
How This Connects With OCR A Level Computer Science
A simple SSH experiment can reinforce a surprisingly large number of H446 ideas.
It provides practical context for:
client-server networking;
IP addresses;
protocols;
TCP;
ports;
network services;
operating systems;
command-line interfaces;
authentication;
encryption;
cybersecurity;
remote administration.
Instead of learning each topic as an isolated definition, students can see how the ideas fit together.
That is far more powerful.
GCSE Students Can Learn From It Too
You do not need A Level knowledge to perform the basic experiment.
A GCSE student can understand:
This computer is asking another computer to do something.
That simple idea can then be developed gradually.
Which computer is the client?
Which is the server?
How does the client identify the server?
Why do we need protocols?
Why does security matter?
What information is travelling across the network?
One practical activity can generate a remarkable number of useful questions.
Why I Like Experiments Like This
One reason I enjoy using physical computers such as the Raspberry Pi when teaching Computer Science is that they make invisible processes more tangible.
Networking is particularly difficult because so much happens where we cannot see it.
Packets move.
Connections are established.
Protocols negotiate.
Ports identify services.
Encryption protects information.
Authentication establishes identity.
Yet to the person sitting at the computer, it may simply look as though some text appeared on a screen.
SSH gives us a way into that hidden world.
Put the Raspberry Pi in another room and suddenly the idea of a network becomes real.
The computer in front of you is no longer necessarily the computer doing the work.
From One Raspberry Pi to the Internet
There is an even bigger idea hiding inside this little experiment.
When I remotely connect from my Windows computer to a Raspberry Pi, I have built a tiny example of something happening throughout modern computing.
Servers sit elsewhere.
Clients request services from them.
Protocols define how they communicate.
IP addresses help data reach the correct systems.
Ports distinguish different services.
Encryption protects communication.
Authentication controls access.
Scale that idea from two computers in a house to millions of machines distributed around the planet and we begin to approach the infrastructure behind the Internet, cloud computing and modern online services.
And it can all begin with something as simple as:
ssh username@IP-address
Final Thought
Computer Science becomes much more interesting when we stop treating a network as a diagram in a textbook and actually build one.
A Raspberry Pi does not need a screen.
It does not need a keyboard.
It does not even need to be in the same room.
Put it somewhere else in the building, connect it to the network and administer it remotely.
Then ask the really interesting questions:
How did my command reach it?
How did the reply find its way back?
How did the server know who I was?
Why couldn't somebody simply read everything travelling between the computers?
Those questions take us from one simple SSH command into networks, protocols, operating systems, cybersecurity and cryptography.
And that is precisely why practical Computer Science can be so much more memorable than simply learning another page of definitions.
#ComputerScience #ALevelComputerScience #OCRComputerScience #H446 #GCSEComputerScience #RaspberryPi #Linux #SSH #Networking #CyberSecurity #Programming #STEMEducation #PrivateTuition #HemelHempstead


