Good afternoon Trinidad and Tobago and the rest of the internet. Decided to record a quick video sharing my experience setting up and using the builtin OpenSSH client and server on my Windows 10.
First thing. Check your version of Windows. Search About in Windows Settings. OpenSSH client beta became available in the fall creators update. Next thing is to enable developer mode. This took some time to get completed. It does display a message describing what this does. Then staying in settings you will search for manage optional features. Then click on “Add a feature”.
Search for OpenSSH client (beta) and also OpenSSH server (beta). Click install for these features. You must restart at this point else you will get an error running the ssh command from the command prompt. After restarting open the command prompt or as I did powershell and try the ssh command now. It works and presents you with the available options.
In troubleshooting why I could not connect to localhost with the ssh command, one blog post suggested to turn on and off device discovery. That did not appear to be the problem. I had problems configuring the SSH server (See link to Powershell Team Blog post in the description below). See upcoming slide for the command that was giving the problem. I had to change the execution policy.
Repair-SshdHostKeyPermission -FilePath C:\Windows\System32\OpenSSH\ssh_host_ed25519_key
Repair-SshdHostKeyPermission : The ‘Repair-SshdHostKeyPermission’ command was found in the module ‘OpenSSHUtils’, but the module could not be loaded. For more information, run ‘Import-Module OpenSSHUtils’.
At line:1 char:1
+ Repair-SshdHostKeyPermission -FilePath C:\Windows\System32\OpenSSH\ss …
+ CategoryInfo : ObjectNotFound:
(Repair-SshdHostKeyPermission:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Please pay attention to what is stated in the blog post. First, it’s worth noting again that this OpenSSH for Windows is still very much in beta form. It should only be used in safe, testing environments.
Even after getting the sshd service to run I still could not connect to the server using the builtin OpenSSH client. It could connect from Putty. Turns out the client and server do not share the same default available key exchange algorithms. I tweeted Windows about my problem and if they respond I will share in the description below.
Hello @Windows. How come builtin OpenSSH client and server (on Windows 10) support different sets of key exchange algorithms by default?
Running “ssh localhost” gives
“Unable to negotiate with ::1 port 22: no matching key exchange method found. Their offer”
Share your experience and thoughts with us in the comments below. Thank you for watching.
ssh -Q kex (to list the supported key exchange algorithms)
Using the OpenSSH Beta in Windows 10 Fall Creators Update and Windows Server 1709 https://blogs.msdn.microsoft.com/powershell/2017/12/15/using-the-openssh-beta-in-windows-10-fall-creators-update-and-windows-server-1709/