Getting started

Use the built-in OpenSSH client in Windows Terminal

Connect to your Linux VPS from Windows 10 or 11 with the built-in ssh command, create and store keys in your.ssh folder, and add a Windows Terminal profile that opens your server in one click.

BeginnerLinux server5 min read

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:

PowerShell
ssh -V

You 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:

PowerShell
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Connect with a password

Open Windows Terminal and run:

PowerShell
ssh root@203.0.113.10

If your server uses a different SSH port, add -p:

PowerShell
ssh -p 2222 root@203.0.113.10

The 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:

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.

PowerShell
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:

PowerShell
ssh root@203.0.113.10

You 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:

PowerShell
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent

Then, in a normal PowerShell window, add your key once:

PowerShell
ssh-add $env:USERPROFILE\.ssh\id_ed25519

The 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_ed25519

Now 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:

  1. Open Windows Terminal and press Ctrl +, to open Settings.
  2. Click Add a new profile → New empty profile.
  3. Set Name to something like Web server.
  4. Set Command line to:
   ssh web

Or use the full form, ssh deploy@203.0.113.10, if you did not create a config entry.

  1. Optionally pick an Icon, and under Appearance a colour scheme, so production servers look different from test ones.
  2. 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:

PowerShell
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 with ssh-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 permissions on 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-add says it cannot connect to the agent: the ssh-agent service is not running. Start it as shown above.
Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.