Skip to content

Instantly share code, notes, and snippets.

@bityob
Last active April 10, 2024 18:50
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bityob/419ca30a766817640e717800b63d6862 to your computer and use it in GitHub Desktop.
Save bityob/419ca30a766817640e717800b63d6862 to your computer and use it in GitHub Desktop.
Enable SSH Client/Server with OpenSSH on Windows

How to enable ssh on Windows?

Tested on Windows Version 10.0.17755.1

  • Run cmd as admin

  • Install OpenSSH.Client - dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

C:\WINDOWS\system32>dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

Deployment Image Servicing and Management tool
Version: 10.0.17755.1

Image Version: 10.0.17755.1

[==========================100.0%==========================]
The operation completed successfully.
  • Install OpenSSH.Server dism /online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0
C:\WINDOWS\system32>dism /online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0

Deployment Image Servicing and Management tool
Version: 10.0.17755.1

Image Version: 10.0.17755.1

[==========================100.0%==========================]
The operation completed successfully.
  • Launch Services (services.msc)

  • Start OpenSSH services (change Startup Type to Automatic)

    • OpenSSH Authentication Agent
    • OpenSSH SSH Server
  • Test ssh to remote server ssh user@remote

C:\WINDOWS\system32>ssh user@remote
user@remote's password:
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-128-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
 user@remote:~#
  • Test ssh from remote server to local machine ssh domain\\myuser@local
user@remote:~# ssh domain\\myuser@local
domain\\myuser@local's password:
Microsoft Windows [Version 10.0.17755.1]
(c) 2018 Microsoft Corporation. All rights reserved.

domain\myuser@local C:\Users\myuser>whoami
domain\myuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment