[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Write-Host "SSL connections enabled for this session" Invoke-WebRequest -Uri https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip -OutFile openssh-server.zip Expand-Archive -LiteralPath .\openssh-server.zip -DestinationPath ‘C:\Program Files’ $env:Path += "C:\Program Files\OpenSSH-Win64" cd "C:\Program Files\OpenSSH-Win64" .\Install-sshd.ps1 Get-Service | ? Name -like *SSH* Start-Service sshd Set-Service -Name sshd -StartupType 'Automatic' Get-NetFirewallRule -Name *ssh* New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force Set-ExecutionPolicy RemoteSigned Set-ExecutionPolicy Bypass -Scope Process Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install -y vim choco install -y git echo $profile echo "$env:Path += 'C:\Program Files\OpenSSH-Win64'" > $profile Write-Host "Desde su computadora anfitriona ingrese ssh administrador@IP_SERVER para poder iniciar una sesion remota" Write-Host "Podra acceder a dos comandos extra choco y git desde el servidor"