DEV Community

AbdulRasheed Agunbiade
AbdulRasheed Agunbiade

Posted on

A Non-Technical Way to Look at SSH

I once heard a colleague say, "I SSH'd into the server" to deploy something. It all seemed so magical.
I remember the first time I heard that — it seemed so abstract, and my skill level felt so out of sync, literally. But just like babies learn to crawl (some of us later than others), we begin to see patterns. And that's all it really is, patterns, things built on top other things.
Before we go on, here's a simple analogy. Imagine an estate, and in it, apartments. Only one person can be in one apartment at any single time. Keep these similarities in mind: the estate address is the IP address, and the apartment number is the port number. Many of these apartments are usually empty, so people can go live there — or someone living in apartment 5 can vacate, and next time you visit, you find someone else in apartment 20.
For a long time, I imagined "ports" only as USB ports on a system. That's not quite true — those are just the computer's physical ports, i.e. USB connectors. But there are also network ports, which is what we're referring to here.
So let's say you want to go to Yusuf's house. His street (IP) address is 192.168.88.100, and his house (port) is 80. If Yusuf lives at port 80, he lets you in. But if no one lives there, you're simply told "connection refused" — which just means no one is there.
A terminal — that black box that always seems like it's only for hackers in the movies — is on all our computers, whether you use Windows, Mac, or Linux. But it's quite powerful. All it needs is for you to spend time with it. You could do things that would surprise you.
Imagine you're on a Windows system (say Windows 10 or 11). You press the power button, enter your password if you have one set up, and you're logged in. Logging into your own machine like this isn't so different from using SSH — except SSH is terminal-based, and reaches into someone else's machine over the network, provided that remote system is on and connected to the internet.
The terms we'll be looking at: SSH, port, network port, host, user, server, IP address, terminal. (PS: SSH stands for Secure Shell.)
The story that makes it click
Say Bob lives in Abuja, but at some point he has to do IT work in Kano — configure a server for an organization, or perform an update. Now he has two options:

  1. Travel to Kano. He'll get tired; if very unlucky, the car breaks down on the road, or worse.
  2. Or — provided that server (remote system) is connected to the internet and he knows its IP address — he can reach the server from the comfort of his home or office, perform the update, and be done. All in perhaps one or two hours, or far less. That's the power of SSH. It lets you connect from your computer to another computer, via the terminal. SSH itself is just a program you run from your terminal (think cmd, PowerShell, bash, etc.) with certain parameters, in the format: ssh user@host -p The server may ask you for a password if it's configured that way. Stripping down the parts
  3. SSH (just an installed program) — think of it as a taxi driver. You tell it: take me to this IP address and this port number.
  4. The terminal — just a means of using SSH.
  5. Port — covered above in our analogy.
  6. User — one of the people who has access to a system (in this case, the server). Just someone who can log in.
  7. Host / IP address — these are interchangeable. It's the system itself, identified either by name (host) or by a group of numbers (IP address). A classic example, from overthewire.org — a site that teaches concepts the hard but fun way, posing a problem for you to solve: ssh bandit0@bandit.labs.overthewire.org -p 2220 bandit is just one of the many sections they offer. That's it on SSH-ing into a server. The next time you hear someone say "I SSH'd into the server", remember: they're simply logging into another computer from theirs. It isn't magic. It's just another skill — and like every other skill, it becomes familiar with practice.

Would love to hear your thoughts.

Top comments (0)