General Knowledge

Getting Started with Your VPS: Connecting from Windows Using PuTTY and WinSCP

October 15, 2025 7 months ago

So, you’ve just received access to your VPS — congratulations!

 A VPS (Virtual Private Server) gives you full control and flexibility, but for beginners, connecting to it for the first time can feel intimidating.

This guide walks you through the exact steps to connect from a Windows computer using two popular (and free) tools: PuTTY for SSH access and WinSCP for file transfers. We’ll also explain what each step does so you know what’s happening behind the scenes.

What You’ll Need

  • Your VPS login details (IP address, username, and password or SSH key)
  • A Windows computer with internet access
  • Two tools:
    • PuTTY
       – for secure shell (SSH) access
    • WinSCP
       – for secure file transfer (SFTP/SCP)

Step 1: Prepare Your VPS for Access

Before connecting, make sure your VPS is ready.

  1. Create a non-root user (recommended):
  2. sudo adduser youruser
    sudo usermod -aG sudo youruser
  3. Enable SSH (should already be running):
  4. sudo systemctl status ssh
  5. Add your SSH public key (for password-less secure login):
  6. mkdir -p ~/.ssh
    echo "your-public-key" >> ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
💡 Why use SSH keys?
They’re more secure than passwords and make logging in faster. You’ll generate them with PuTTYgen in the next step.

Step 2: Install PuTTY and Generate Your SSH Key

  1. Download and install PuTTY from the official site
    .
    The installer includes PuTTYgen (for key generation) and PSCP (for command-line file transfers).
  2. Open PuTTYgen → click Generate and move your mouse around the blank area to create randomness.
  3. Once the key appears:
    • Click Save private key (this saves a .ppk file to your PC).
    • Copy the text from the top window (your public key) and paste it into your VPS file:
    • ~/.ssh/authorized_keys
  4. Optional: Set a passphrase for extra security.

Step 3: Connect to Your VPS with PuTTY

  1. Launch PuTTY.
  2. In the Host Name (or IP address) box, type your VPS IP — for example:
  3. [email protected]
  4. Leave Port as 22 (unless your provider specifies another).
  5. Under Connection → SSH → Auth, click Browse… and select your .ppk private key file.
  6. Return to the Session category, give it a name (e.g., “My VPS”), and click Save to store your settings.
  7. Click Open to connect.

If it’s your first time connecting, PuTTY will ask to accept the server’s host key — click Yes.
Then you’ll see a terminal window — your direct command line into the server.

Step 4: Transfer Files Using WinSCP

Now that you can connect, let’s move files between your computer and the VPS.

  1. Download and install WinSCP from winscp.net
    .
  2. When launched, you’ll see the Login dialog:
    • File protocol: SFTP
    • Host name: your VPS IP (e.g., 203.0.113.45)
    • Port number: 22
    • Username: your VPS username
    • Private key file: (browse to the same .ppk you created earlier)
  3. Click Save, then Login to connect.

Once connected, the left panel shows your local files and the right panel shows your VPS files.
Drag and drop files between the two panels to upload or download.

You can also:

  • Right-click → Edit to open a remote file directly.
  • Use the Synchronize feature to keep local and remote folders in sync.
  • Resume failed transfers using the Transfer Queue.

Step 5: Secure Your Server (Highly Recommended)

After connecting successfully:

  1. Update packages:
  2. sudo apt update && sudo apt upgrade -y
  3. Enable a firewall:
  4. sudo ufw allow OpenSSH
    sudo ufw enable
  5. Install fail2ban to protect from brute-force attacks:
  6. sudo apt install fail2ban
  7. Disable password authentication in /etc/ssh/sshd_config for extra security:
  8. PasswordAuthentication no

Optional: Use VS Code for Remote Editing

If you prefer a modern coding experience, install Visual Studio Code
and the Remote-SSH extension.
This lets you open your VPS filesystem directly inside VS Code — no need to manually upload files.

Summary

You’ve now:

  • Connected securely to your VPS using PuTTY
  • Transferred files easily with WinSCP
  • Set up SSH keys for secure, password-less login
  • Taken basic steps to secure your system

You’re ready to start deploying websites, apps, or projects on your VPS with confidence.

Tool Reference Links:

  • 🔗 PuTTY (official site)
  • 🔗 WinSCP (official site)
  • 🔗 Visual Studio Code Remote-SSH
↑↓ navigate select
⌘K to toggle