DEV Community

Cover image for How to Set Up Passwordless SSH Login with PuTTY.
Tahsin Abrar
Tahsin Abrar

Posted on

How to Set Up Passwordless SSH Login with PuTTY.

If you’ve ever logged into your VPS again and again using a password, you already know how repetitive and risky it can be.

There’s a better way.

In professional server environments, developers almost always use SSH key-based authentication instead of passwords. It’s faster, more secure, and honestly… once you set it up, you won’t want to go back.

In this guide, I’ll walk you through how to set up passwordless SSH login using PuTTY in a simple, practical way.


What Is Passwordless SSH Login?

In simple terms:

  • Instead of typing a password every time
  • You use a private key file stored on your computer
  • The server verifies it using a public key

Think of it like this:

Your server has a lock (public key), and your computer has the only matching key (private key)

No password needed. Just instant access.


Step 1: Generate SSH Key Pair Using PuTTYgen

First, we need to create two keys:

  • Private Key (.ppk) → stays on your PC
  • Public Key → goes to your server

Steps:

  1. Open PuTTYgen (comes with PuTTY)

  2. Under Parameters, select:

  • Ed25519 (modern, faster, more secure than RSA)
  1. Click Generate

  2. Move your mouse randomly (this generates randomness)

  3. Once done:

  • Click Save private key
  • Save it somewhere safe (very important ⚠️)
  1. Copy the public key from:
   Public key for pasting into OpenSSH authorized_keys file
Enter fullscreen mode Exit fullscreen mode

Step 2: Add Public Key to Your VPS

Now we tell the server: “This key is allowed to access you.”

Login to your VPS (last time using password)

Then run:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
Enter fullscreen mode Exit fullscreen mode

Open authorized_keys file:

nano ~/.ssh/authorized_keys
Enter fullscreen mode Exit fullscreen mode

Paste your public key

  • Right-click in PuTTY → it will paste automatically
  • Then save:
Ctrl + O → Enter → Ctrl + X
Enter fullscreen mode Exit fullscreen mode

Secure the file:

chmod 600 ~/.ssh/authorized_keys
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure PuTTY for One-Click Login

Now comes the fun part no more typing anything 😄

Steps:

  1. Open PuTTY

  2. Go to:

   Connection → Data
Enter fullscreen mode Exit fullscreen mode
  • Set:

     Auto-login username: your_username (e.g., root / ubuntu)
    
  1. Go to:
   Connection → SSH → Auth → Credentials
Enter fullscreen mode Exit fullscreen mode
  • Select your .ppk file
  1. Go back to:
   Session
Enter fullscreen mode Exit fullscreen mode
  • Enter:

    • Host Name (IP)
    • Saved Session name (e.g., My Production VPS)
  1. Click Save

Result: One Click Login

From now on:

  • Open PuTTY
  • Double-click your saved session

You’re instantly logged in. No password. No hassle.


Real-Life Scenario

Let’s say you’re deploying a Laravel project from GitHub to your VPS.

Before:

  • Login with password every time
  • Risk of brute-force attacks
  • Slower CI/CD setup

After:

  • Instant login using SSH key
  • Easy automation (GitHub Actions, scripts)
  • Much more secure

This is exactly how most production servers are managed in real-world teams.


Setting up SSH key-based login might feel a bit technical at first but it’s one of those upgrades that pays off immediately.

You get:

  • Better security
  • Faster access
  • Easier automation

And honestly… once you start using it, typing passwords will feel outdated.

Top comments (0)