Windows 10 and 11 include the same OpenSSH client that Linux and macOS use. You do not need to install PuTTY: open PowerShell or Windows Terminal, type ssh, and you are connected to your Linux VPS. This guide shows how to connect, set up key login and add a Windows Terminal profile for each server.
Before you start
- Your VPS IP address, username and password from the service page in your VPS provider's control panel.
- Windows 10 (version 1809 or later) or Windows 11.
- Windows Terminal. It is built into Windows 11 and available from the Microsoft Store for Windows 10. Plain PowerShell also works.
Check the client is installed:
ssh -VYou should see a version line such as OpenSSH_for_Windows_9.5p1. If you get ssh is not recognized, install it under Settings → System → Optional features → Add a feature → OpenSSH Client (on Windows 10, Settings → Apps → Optional features). Or run this in PowerShell as Administrator:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0Connect with a password
Open Windows Terminal and run:
ssh root@203.0.113.10If your server uses a different SSH port, add -p:
ssh -p 2222 root@203.0.113.10The first time, you see a message like this:
The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:abc123...
Are you sure you want to continue connecting (yes/no/[fingerprint])?Type yes and press Enter. Windows saves the server's key in %USERPROFILE%\.ssh\known_hosts and warns you if it ever changes.
Enter the password when asked. Nothing appears while you type, which is normal. Paste with right-click or Ctrl + V in Windows Terminal, then press Enter.
Type exit to close the session.
Create an SSH key
Keys are safer than passwords. Create one in PowerShell:
ssh-keygen -t ed25519 -C "deploy@laptop"Press Enter to accept the default location and set a passphrase. Two files are created in C:\Users\<you>\.ssh\:
id_ed25519: your private key. Never share it.id_ed25519.pub: your public key, which goes on the server.
Copy the public key to the server
Windows does not include ssh-copy-id. This PowerShell one-liner does the same job: it reads your public key and appends it to authorized_keys on the server.
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@203.0.113.10 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"Enter your password one last time. Then connect again:
ssh root@203.0.113.10You are asked for the key's passphrase instead of the server password. For more about keys, see Set up SSH keys.
Remember the passphrase with ssh-agent
Windows includes an ssh-agent service that can hold your unlocked key. It is disabled by default. In PowerShell as Administrator:
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agentThen, in a normal PowerShell window, add your key once:
ssh-add $env:USERPROFILE\.ssh\id_ed25519The Windows agent stores the key securely and keeps it after a reboot, so you will not be asked for the passphrase again on this user account.
Save hosts in an SSH config file
Instead of typing IPs, create C:\Users\<you>\.ssh\config (no file extension) with an entry for each server:
Host web
HostName 203.0.113.10
User deploy
Port 22
IdentityFile ~/.ssh/id_ed25519Now ssh web connects with the right user, port and key. See Use the SSH config file to save hosts for more options.
Add a Windows Terminal profile
A profile puts your server in the Terminal's drop-down menu:
- Open Windows Terminal and press Ctrl +, to open Settings.
- Click Add a new profile → New empty profile.
- Set Name to something like
Web server. - Set Command line to:
ssh webOr use the full form, ssh deploy@203.0.113.10, if you did not create a config entry.
- Optionally pick an Icon, and under Appearance a colour scheme, so production servers look different from test ones.
- Click Save.
Open the drop-down arrow next to the tabs and choose your new profile. It connects straight away.
Check it works
From PowerShell, run a command on the server without opening an interactive session:
ssh web "hostname && uptime"You should see the server's hostname and uptime, with no password prompt if your key and agent are set up.
Troubleshooting
ssh: connect to host... port 22: Connection timed out: the server is off, the IP is wrong, or a firewall blocks the port. Check the server in your VPS provider's control panel. See Fix SSH connection refused or timed out.WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!: the server key changed, usually after an OS reinstall. If you reinstalled, remove the old entry withssh-keygen -R 203.0.113.10. If you did not, investigate first.Permission denied (publickey): the server did not accept your key. Check that the public key is in the right user's~/.ssh/authorized_keys.Bad permissionson the config or key file: Windows OpenSSH requires that only your user can read them. Right-click the file, open Properties → Security → Advanced, disable inheritance and leave only your own account.ssh-addsays it cannot connect to the agent: thessh-agentservice is not running. Start it as shown above.
