

Understand what you want and use the right one for you. The WSL2 IP address changes on reboot and you'll need to maintain your portproxy rules and firewall rules with the script listened at the end of that post.

#SSH SYNCOVERY FOR FREE#
Since I'm using bash.exe, I get WSL2 starting up for free but SSH with this solution is using Windows's SSH keys and Windows auth.
#SSH SYNCOVERY FULL#
HEADS UP: You need the FULL AND CORRECT PATH in that command above. Note that bash.exe in this context starts up " wsl -d YOURDEFAULTDISTRO" so you'll want to know what your Default is, and if you don't like it, change it with wsl -set-default DISTRO. New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\WINDOWS\System32\bash.exe" -PropertyType String -Force There are four steps required to enable SSH support on a Cisco IOS router: 1. You can use whatever makes you happy and WSL2's bash makes me happy. In this case, I'll use open source cross platform PowerShell Core. On my server (the Windows machine I'm SSHing into) I will set a registry key to set the default shell.
#SSH SYNCOVERY WINDOWS 10#
Or automatic: Set-Service -Name sshd -StartupType 'Automatic' Configuring the Default Shell for OpenSSH in Windows 10

Now either start the SSHD service, or set it to start automatically: Start-Service sshd See how I have the Client and not the OpenSSH Server? Add it: Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 How do you set up SSH'ing into WSL2 on your Windows 10 machineįirst, open an admin PowerShell prompt (Start menu, type PowerShell, hold ctrl+shift, and hit enter) type this: > Get-WindowsCapability -Online | ? Name -like 'OpenSSH*' Now you have no port forwarding, firewalls are only opening for one process, and your WSL2 instance starts up on entry. So why not change the default Windows shell for SSH to WSL2's Bash?īoom. The issue is that you (Mac and Linux switchers) don't like the default shell - PowerShell. In fact, it's shipped OpenSSH as a "Feature on Demand" for years.
#SSH SYNCOVERY HOW TO#
In that post - which you should not do - you're turning off the Windows Firewall for your port, forwarding to an internal subnet, and then letting WSL take over.īUT! Windows 10 already knows how to accept SSH connections.

You're forwarding ports into a little VM'ed local subnet, you're dealing with WSL2 IP addresses changing, you'll have to keep your VM running, and you're generally trying to ice skate up hill. AND DO NOT DO IT BECAUSE IT'S TOO COMPLEX.ĭO NOT DO THIS. This can take almost 99% of the time needed to add/link object files to Delphi and find external dependencies, removing the need to deal with the order of those files, and their circular dependency if there is any.ģ) is the case is to only build libssh2 without OpenSSL, or libssh2 be linked as object files directly into Delphi not using DLL ?, i tried to open the VS solution (libssh2.dsw) and it was reported as corrupted project, there might be a chance to make this work.This is an interesting blog post on How to SSH into WSL2 on Windows 10 from an external machine. I would pick mbedTLS any time, compiling it from visual studio is piece of cake, also if libssh2 internally will use it for crypto then the size will be so much smaller, we are talking about something less than 500kb for full mbedTLS, i know it is slower than OpenSSL in some places, but not sure it will be slower for just CSPRNG.Ģ) Something always annoyed me, why no one did link the obj's files in to one with zLib !, you can link multiple obj files into one with
