SSH - The Hero That Saved Your Passwords
Thilan Dissanayaka Computer Networking June 04, 2020

SSH - The Hero That Saved Your Passwords

Admins were tired. For years, they used Telnet to log into remote servers. It worked—but it exposed every keystroke. If Alice typed her password, Trudy the attacker could see it.

Networks were turning into digital battlefields, and defenders had no armor.

But then a quiet revolution began in Finland…

The Arrival of SSH

In 1995, Tatu Ylönen watched the internet fall apart under sniffers and hijacked sessions. So he created a new protocol. He called it Secure Shell, or simply SSH.

SSH brought three magical powers:

  • Encryption - Everything you type becomes unreadable to outsiders.
  • Authentication - Only trusted keys or passwords can log in.
  • Integrity - Attackers can’t tamper with your commands unnoticed.

Suddenly, remote access became safe again.

SSH introduced a beautiful idea: public‑key cryptography.

Your private key is your secret identity.

Your public key can be shared widely.

When you try to connect to a server, SSH uses these keys to prove who you are—without ever sending your private key across the network.

It’s like having a magical lock that only your unique key can open, even if thieves are watching.

Generating a key pair:

ssh-keygen -t ed25519 -C \"[email protected]\"

This creates:

id_ed25519 → Your private key (KEEP SAFE)

id_ed25519.pub → Your public key (SHARE WITH SERVERS)

To install the public key on a server:

ssh-copy-id username@server-ip

Now you can log in without passwords:

ssh username@server-ip

The future had arrived.

Chapter 4: Armored Communication

SSH connections are fortified tunnels.

Everything you type— commands, file transfers, even passwords (if you still use them)— travels through an encrypted channel built using:

Diffie-Hellman key exchange

Asymmetric encryption (Ed25519, RSA)

Symmetric encryption (AES, ChaCha20)

MAC integrity checks

It’s like whispering secrets inside a steel bunker while the rest of the network burns around you.

Chapter 5: The Tools of the Warrior

SSH isn’t just for logging in. It’s a Swiss‑army knife for system administrators and security engineers.

🛠 Tool 1: Remote Login ssh [email protected]

🛠 Tool 2: Secure File Transfer (SCP) scp file.txt user@server:/home/user/

🛠 Tool 3: Interactive File Browser (SFTP) sftp user@server

🛠 Tool 4: Remote Port Forwarding

Expose local services securely:

ssh -R 8080:localhost:3000 user@server

🛠 Tool 5: Tunneling a Database

Safely access a remote DB:

ssh -L 5432:localhost:5432 user@db-server

Suddenly your development environment isn’t limited by geography.

Chapter 6: The Gatekeeper Config File

SSH became so powerful that admins needed shortcuts.

Enter the ssh config file:

~/.ssh/config

Host production HostName 34.201.45.90 User ubuntu IdentityFile ~/.ssh/id_ed25519 Port 22

Now you can simply type:

ssh production

No more long commands. The gate opens automatically.

Chapter 7: The Battle Against Attackers

SSH is secure, but nothing is invincible. Attackers still try:

Brute‑forcing passwords

Exploiting weak keys

Targeting outdated versions

Harvesting private keys from infected machines

So defenders learned powerful strategies:

✅ Disable password logins sudo nano /etc/ssh/sshd_config PasswordAuthentication no

✅ Allow only key‑based login ✅ Change the default port ✅ Use fail2ban to block attackers

With these defenses, SSH became a fortress.

Chapter 8: Replacing Telnet Everywhere

Little by little, Telnet disappeared.

Routers, switches, servers—everything moved to SSH. Even remote Git repositories run over SSH today.

SSH became the gold standard for:

System administration

DevOps

Cloud engineering

Secure CI/CD pipelines

Git operations

Secure port forwarding

Secure automation

It wasn’t just a protocol; it was a revolution.

ALSO READ
Blockchain 0x000 – Understanding the Fundamentals
May 21, 2020 Web3 Development

Imagine a world where strangers can exchange money, share data, or execute agreements without ever needing to trust a central authority. No banks, no intermediaries, no single point of failure yet...

Identity and Access Management (IAM)
May 11, 2020 Identity & Access Management

Who are you — and what are you allowed to do? That's the fundamental question every secure system must answer. And it's exactly what Identity and Access Management (IAM) is built to solve.

How I built a web based CPU Simulator
May 07, 2020 Pet Projects

As someone passionate about computer engineering, reverse engineering, and system internals, I've always been fascinated by what happens "under the hood" of a computer. This curiosity led me to...

Writing a Shell Code for Linux
Apr 21, 2020 Exploit Development

Shellcode is a small piece of machine code used as the payload in exploit development. In this post, we write Linux shellcode from scratch — starting with a simple exit, building up to spawning a shell, and explaining every decision along the way.

Exploiting a Stack Buffer Overflow on Windows
Apr 12, 2020 Exploit Development

In a previous tutorial we discusses how we can exploit a buffer overflow vulnerability on a Linux machine. I wen through all theories in depth and explained each step. Now today we are going to jump...

Access Control Models
Apr 08, 2020 Identity & Access Management

Access control is one of the most fundamental concepts in security. Every time you set file permissions, assign user roles, or restrict access to a resource, you're implementing some form of access control. But not all access control is created equal...

Exploiting a  Stack Buffer Overflow  on Linux
Apr 01, 2020 Exploit Development

Have you ever wondered how attackers gain control over remote servers? How do they just run some exploit and compromise a computer? If we dive into the actual context, there is no magic happening....

Basic concepts of Cryptography
Mar 01, 2020 Cryptography

Ever notice that little padlock icon in your browser's address bar? That's cryptography working silently in the background, protecting everything you do online. Whether you're sending an email,...

Common Web Application Attacks
Feb 05, 2020 Application Security

Web applications are one of the most targeted surfaces by attackers. This is primarily because they are accessible over the internet, making them exposed and potentially vulnerable. Since these...

Remote Code Execution (RCE)
Jan 02, 2020 Application Security

Remote Code Execution (RCE) is the holy grail of application security vulnerabilities. It allows an attacker to execute arbitrary code on a remote server — and the consequences are as bad as it sounds. In this post, we'll go deep into RCE across multiple languages, including PHP, Java, Python, and Node.js.