SSH and SFTP Connect with Windows PowerShell or cmd

Deutsch

Connect with Windows PowerShell or cmd

Use the OpenSSH client built into Windows 10 and 11 to sign in and copy files without installing anything.

Windows 10 and 11 include ssh, sftp and scp. If ssh is not found, open Settings > System > Optional features and add OpenSSH Client.

Before you begin

Your key is on your site (see Add or remove an SSH key).

Steps

  1. Right-click the Start button and open Terminal, Windows PowerShell or Command Prompt.
  2. Paste the Connect line from the SSH & SFTP tab, for example ssh -p 7822 [email protected], and press Enter.
  3. The first time, compare the fingerprint with the one on the tab and type yes.
  4. Type your key's passphrase if you set one.
  5. Type exit to leave.

Result

You are signed in over SSH from Windows.

What to do next

Copy files: scp -P 7822 site.zip [email protected]:httpdocs/, or sftp -P 7822 [email protected].

Type the passphrase once per session: in PowerShell as administrator run Get-Service ssh-agent | Set-Service -StartupType Automatic and Start-Service ssh-agent, then ssh-add as yourself.

The ~/.ssh/config file described in Connect with the macOS Terminal works on Windows too: it is %USERPROFILE%\.ssh\config.