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. 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 is an interesting blog post on How to SSH into WSL2 on Windows 10 from an external machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |