0

I need to isntall SSH server on windows 11 using powershell. It should be a script that isntalls SSH server and logs you in and does everything untill this: ssh domain\username@servername

These are some methods I tried but unsuccessfully: (offline ofc) https://it-infra-ya.com/en/ws19-sshserver_en/#toc2 from github, with .msi file (this works but I need to strat the script from server offline and this method doesnt work for me..) I tried to do that by downloading file "OpenSSH-Client-Package_31bf3856ad364e35_amd64__" from https://www.exefiles.com/en/cab/openssh-client-package-31bf3856ad364e35-amd64-cab/ and using this command : PS C:\Windows\system32> DISM /Online /Add-Package /PackagePath:C:\Users\krivosik\Desktop\Scripts\scripts\OpenSSH-Client-Package_31bf3856ad364e35_amd64__.cab I read that the "Online" part doesnt really mean online so it should work but it does not work for me.. I dont have that ISO file where the .cab file should be located so i cant really work with this: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities?view=windows-11.

Can anyone help how to do it the way i need to? thanks. The best way would be to work with that .cab file but ill take anything :D

Gaara
  • 1

1 Answers1

0

Not sure what your goal is in detail but I think this information will help you to achieve it.

Get the latest Version from as zip https://github.com/PowerShell/Win32-OpenSSH/releases unpack it where you want to install it, like C:\Program Files\

Open CMD as Admin, move to this directory and run

powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1

These Services will be installed. You can chnage them to starttype automatic if you want: enter image description here

Start these services.

If you need to change anything the configuration will be placed at C:\ProgramData\ssh\sshd_config

Manu
  • 789
  • 4
  • 19