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:
Open PuTTYgen (comes with PuTTY)
Under Parameters, select:
-
Ed25519(modern, faster, more secure than RSA)
Click Generate
Move your mouse randomly (this generates randomness)
Once done:
- Click Save private key
- Save it somewhere safe (very important ⚠️)
- Copy the public key from:
Public key for pasting into OpenSSH authorized_keys file
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
Open authorized_keys file:
nano ~/.ssh/authorized_keys
Paste your public key
- Right-click in PuTTY → it will paste automatically
- Then save:
Ctrl + O → Enter → Ctrl + X
Secure the file:
chmod 600 ~/.ssh/authorized_keys
Step 3: Configure PuTTY for One-Click Login
Now comes the fun part no more typing anything 😄
Steps:
Open PuTTY
Go to:
Connection → Data
-
Set:
Auto-login username: your_username (e.g., root / ubuntu)
- Go to:
Connection → SSH → Auth → Credentials
- Select your
.ppkfile
- Go back to:
Session
-
Enter:
- Host Name (IP)
- Saved Session name (e.g.,
My Production VPS)
- 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)