Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
Security

Two-factor authentication for Windows sign-in and RDP

How two-factor authentication works on Windows 11 and Windows Server: Microsoft account two-step verification, Windows Hello, and real options for RDP logins.

CloudSat teamNovember 18, 20266 min read
Abstract illustration of a desktop window guarded by two interlocking rings, one shaped like a key and one like a phone
On this pageThree layers, three answers

"Turn on two-factor authentication" means three different things on Windows. Your Microsoft account has two-step verification. Your PC sign-in has Windows Hello. And Remote Desktop to a server has, by default, nothing beyond a password. Each layer needs its own fix, and the RDP one is the layer attackers hit hardest.

Windows 10 left support in October 2025 and its consumer extended updates ended in October 2026, so the steps below use Windows 11 and Windows Server 2025. Most of them work the same on older releases.

Three layers, three answers

Layer What it guards Second factor available
Microsoft account Outlook, OneDrive, the Store, and any PC you sign in to with it Two-step verification: authenticator app, security key, backup email or phone
Sign-in on the PC itself The local session Windows Hello: a PIN, face or fingerprint tied to that one device
Remote Desktop to a server The whole machine, from anywhere None built in: add a gateway, a VPN or a credential provider

Turn on two-step verification for a Microsoft account

  1. Sign in at account.microsoft.com/security.
  2. Select Manage how I sign in.
  3. Under Additional security, find Two-step verification and select Turn on.
  4. Follow the prompts. Setting up an authenticator app means scanning a QR code with your phone.

Before you finish, add more than one way to prove it is you. Microsoft strongly recommends keeping three pieces of security info on the account, and warns that regaining access after losing your only method can take 30 days. An authenticator app plus a second email address is a sensible minimum, and a hardware security key is a good third.

Prefer the app over text messages. Microsoft has said it is phasing out SMS as a sign-in and recovery method for personal accounts, and codes sent by text are the easiest kind to intercept. Older apps that cannot show a code prompt, such as some mail clients, need an app password, which appears on the same Additional security page once two-step verification is on.

Windows Hello: two factors on one device

A Windows Hello PIN looks like a short password, but it works differently. The PIN or your face opens a private key that lives in the PC's TPM chip, and that key is what signs you in. Someone who learns your PIN cannot use it from another computer, and the TPM limits how many guesses it accepts. That combination of "something you have" and "something you know" is why Microsoft treats Hello as stronger than a password.

Set it up under Settings > Accounts > Sign-in options. On the same page, the option to allow only Windows Hello sign-in for Microsoft accounts on the device removes the password prompt from the lock screen, so a phished password cannot be typed in there.

The same Hello credential stores passkeys for websites that support them, which replace a password and a code with one fingerprint or PIN. Local accounts can use Hello too, but Windows has no built-in way to add an authenticator code to a local account.

Remote Desktop has no second factor of its own

Network Level Authentication makes RDP check the username and password before a session starts, which saves resources and hides the login screen from scanners. It does not add a factor. Any server with port 3389 open to the internet receives a steady stream of password guesses, and a reused or weak administrator password is how many Windows servers get taken over.

You have four realistic options, and they stack:

Option What it adds Fits
Allow 3389 only from your own addresses Not a factor, but the login prompt disappears from the internet Every server; do it first
A VPN in front, with RDP reachable only through the tunnel A key or certificate before RDP is even visible Single servers and small teams
RD Gateway with the NPS extension for Microsoft Entra multifactor authentication An approval prompt in Microsoft Authenticator for each connection Organizations with Active Directory synced to Microsoft Entra ID
A third-party credential provider A code or push prompt at every Windows logon, RDP included Standalone servers that need per-login approval

Restrict the port first

On a cloud server, the provider's firewall is the cleanest place to do this, because blocked traffic never reaches Windows. On CloudSat, a cloud firewall rule for TCP 3389 with your office or home address in Sources does it in one row. Inside Windows, scope the built-in Remote Desktop rules to the same address, keeping your current session open while you test a second connection:

Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Set-NetFirewallRule -RemoteAddress 198.51.100.24

RD Gateway and Microsoft Entra

Microsoft's own route puts a Remote Desktop Gateway in front of your servers and sends each sign-in through a Network Policy Server that runs the Entra MFA extension. It needs a Remote Desktop Services deployment, an Entra multifactor authentication license, and on-premises Active Directory users synced to Entra ID. It also accepts only a phone call or an Authenticator approve or deny prompt: the gateway cannot take a typed code, so text messages do not work. For a lone server with local accounts, it is the wrong tool.

Credential providers

A credential provider is a plugin for the Windows logon screen. Products such as Duo Authentication for Windows Logon, and open-source projects such as the privacyIDEA and multiOTP credential providers, add a code or push step to console and RDP logins on standalone servers. Install one while you still have a working session, test a second RDP login before you sign out, and read how it behaves when its server is unreachable. A logon plugin that fails closed can lock you out as surely as a lost password.

Protect the accounts above the server

Whoever controls your hosting account can reset passwords, open a console or rebuild the machine, so it deserves the same protection as the server. CloudSat's console supports two-factor authentication with any standard authenticator app. The email inbox that receives password resets for all of these accounts needs two-step verification as well, or it becomes the weak link.

Keep a way back in

  • Store backup and recovery codes offline, away from the phone that runs your authenticator.
  • Register a second factor, such as a hardware key, before you need it.
  • For servers, know the out-of-band path before you need it. A provider's web console reaches the logon screen even when RDP or a logon plugin does not.

FAQ

Is a Windows Hello PIN weaker than a password?

No. The PIN only works on the device that holds the matching key in its TPM, and the TPM stops answering after repeated wrong guesses. A password works from anywhere it is typed.

Can I add authenticator codes to a local Windows account?

Not with Windows alone. You need a third-party credential provider, which then handles local sign-in and RDP alike.

Does moving RDP to another port protect it?

It cuts automated noise, but it is not a factor and a full port scan still finds it. Restricting the port to known addresses, or putting it behind a VPN, does far more.

What happens if I lose my phone?

Sign in with a backup code or another registered method, then remove the old device and register the new one. For a Microsoft account with no working method left, the recovery process can take up to 30 days.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.