How to log in with and what is SSH?

How to log in with and what is SSH?

SSH (Secure Shell) is a secure way to remotely access and control a computer, usually a server, over the internet. It’s like opening a secret door to your server, where everything you type and see is encrypted — safe from prying eyes.

Whether you’re hosting a website on DigitalOcean, Linode, or Hetzner, SSH is the most common way developers connect to their cloud servers.

🧠 How It Works (Simply)

SSH works with key pairs — like a lock and key system:

  • Private key: stays safe on your computer.
  • Public key: gets copied to the server.

When you connect, your computer uses the private key to prove it has access. No passwords needed (though they can still be used as backup).

🔑 Can You Have Multiple Keys?

Yes! You can generate and use multiple SSH keys. Each one can be used for different services or accounts — for example:

  • id_rsa: for GitHub
  • linode_key: for your Linode server
  • work_key: for company servers

You just have to manage them in your SSH config file (more on that later).

⚙️ How to Generate an SSH Key

On macOS, Linux, or WSL (Windows Subsystem for Linux):

ssh-keygen -t ed25519 -C "your_email@example.com"

It will ask where to save it. You can name it and add a passphrase if you want extra protection.

  • -t specifies the type of your key, in this case Ed25519 (Edwards-curve DSA), the newer and most security type. You could also use RSA (the default if you don't specify), DSA, RSA or ECDSA.

This creates two files on your filesystem's path '~/.ssh':

  • id_ed25519: your private key
  • id_ed25519.pub: your public key

🌐 Connecting to Your Cloud Server

After creating your SSH key:

  1. Add your public key to the server:

Most platforms let you paste it when setting up a new server.
Or manually run:

ssh-copy-id -i ~/.ssh/id_ed25519.pub user@your-server-ip
  1. Connect using SSH:
ssh -i ~/.ssh/id_ed25519 user@your-server-ip
  1. Or set up a config file in your computer (~/.ssh/config):
Host myserver
  HostName 192.0.2.123
  User root
  IdentityFile ~/.ssh/id_ed25519

Then just run:

ssh myserver

✅ Recap

  • SSH = secure access to remote machines
  • Uses a public/private key pair
  • You can have multiple keys
  • Easy to generate and use
  • Works with any cloud/VPS platforms like Linode, DigitalOcean, and Hetzner.

Did it worked for you? Let me know on the comments.

Thanks and see you on the next one!