Would you like to secure your SSH or SFTP connections on Windows? This step-by-step guide shows you how to generate an SSH key pair (public and private) using PuTTYgen, and how to use it in PuTTY and FileZilla for your SSH and SFTP connections. This may come in handy for some developers needing to connect to a web hosting.
Contents
Why use an SSH key for authentication?
Using an SSH key for authentication considerably strengthens the security of remote connections, especially via SSH or SFTP.
Unlike a password, which can be guessed or intercepted, an SSH key is based on an asymmetrical encryption mechanism: only the person with the private key can access the server authorizing its corresponding public key.
This system greatly reduces the risk of intrusion, and automates secure connections without having to enter a password every time.
1. Download PuTTYgen
Here are direct links to the latest official 64-bit x86 (recommended) and ARM versions.
These links can be found on the official websites:
- Go to official website : https://www.putty.org.
- Click on Download Putty. You will arrive on the https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.htmlwhich is also an official site.
- Click on "puttygen.exe" corresponding to your architecture (usually 64-bit x86) to download it.
NB: Place the tool in the folder of your choice for easy retrieval.
2. Generate private/public SSH key pairs under Windows
Once PuTTY has been launched, you will see the following window:

The first setting to make is at the very bottom: key type and size.
2.1 What type of SSH key should I choose?
- The default "RSA" is correct.
- Our recommendation in 2025 is EdDSA mode, which allows shorter public keys with an equivalent level of security, and most servers are compatible.
- The other modes are generally unused, and for reasons of security and modern compatibility, SSH-1 should be avoided (unless you're connecting to a server that's more than 10 years old).
2.2 Generating the SSH key
- Once the key type has been selected (or left as default)
- Click on "Generate
- Move your mouse randomly in the middle of the window to generate the random values required to secure the SSH key.

2.3 Saving the SSH key
Beware: If you lose your private key, you lose your access. If you lose your public key, you can't be granted new access. If someone recovers your keys, they can connect to the same services as you. So you need to keep your key in a safe, private place.
Once the key has been generated, the following screen appears:

- In the "Key Comment" section, add a relevant comment, so that we know who owns the key - for example, your first name. This comment will be added at the end of your public key.
- Optionally, you can define a "passphrase" that will be prompted each time you connect. This protects you in case your SSH key is stolen, but forces you to retype a password each time.
- Click on "Save public key", and give it a relevant name, e.g. "prenom.pub.key", and save it in a valuable folder.
- Click on "Save private key", validate the warning and give it an appropriate name, e.g. "prenom.priv.ppk", then save it in a precious folder.
What SSH key do I need to authorize access?
⚠️ Attention : Your private key is like a password, it must remain strictly private. If you provide your private key to a third party, they will be able to connect to the same servers as you.
When a provider asks for your SSH key to authorize access, it asks for your public key and only that.
Set up SSH key for SSH connection (PuTTY, Windows)
Beforehand :
- Download PuTTY on the official download page.
- Put it in a folder where you will find it again, for example the same folder as PuTTYgen.
Once you've launched putty.exe, you'll see the following screen:

- Enter server (host name) or server IP
- Enter port (default SSH port: 22)
- In the "Saved sessions" field, choose a name for the connection, for example "My site srv01".
See an example


- Go to the tab: Connection/Data
- In "Auto-login username", define your SSH user name (in the example: mysite-user).

- Go to the tab: Connection/SSH/Auth/Credentials
- In the "Public-key authentication" field, click on "Browse" to fetch your private key, previously generated with PuTTYgen.

- Return to the first "Session" tab
- Save the session by clicking on "Save".

Congratulations, you've successfully configured your SSH key!
To log in, simply :
- Double-click on the connection name in the list
- Or click on the connection name and then on "Open".
Using an SSH key for SFTP (FileZilla Windows)
SFTP lets you browse files on a server using the SSH protocol. The connection is therefore encrypted, and we'll look at how to authenticate yourself with an SSH key for an SFTP connection.
Go to "Site Manager :
- Under "File", then "Site Manager".
- Or click on the first icon at top left, under the "File" menu.

- In the bottom left-hand corner, click on "New site", then name this access and make sure it's selected (highlighted).
- In the right-hand pane, select the SFTP protocol and fill in the IP or hostname of the server provided by the hosting provider. Note: the default port per standard for SSH and SFTP is port 22, which will be applied if you leave this field blank.
- Choose the "Key File" login type.
- In "User", enter the user you wish to connect to.
- In "Key File", click on "Browse" to fill in your private key.
You can then click on "Connect" to log in, and recall this site manager window for future connections.
Bonus: Where does the name "PuTTY" come from?
The name PuTTY is a technical pun. It refers to TTY (short for teletypewriter), a term inherited from the first text-based terminals used in UNIX and Linux. Even today, command-line interfaces (such as virtual consoles or SSH terminals) that let you interact with a system via text are still called "TTY". PuTTY, on the other hand, is a SSH (Secure Shell) client, a protocol that enables secure remote connection to a server, often Linux, via a terminal. The name thus combines the idea of "TTY" and the software's objective: to facilitate secure connections to remote systems from a Windows environment.
Conclusion
By following this tutorial, you've generated a secure SSH key pair and configured your SFTP access with FileZilla. Don't forget to keep your private key and save your public key for future authorizations.
If you want a web host that supports SSH and SFTP, choose a LRob Web Hosting. If you have 4 or more sites, don't miss our offers Web Agency.