GeoNetAgent, LDAPWeb, server-audit, server-connection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
475 B

# Buka SSH shell ke reverse proxy
# Usage: .\scripts\ssh-remote.ps1
# .\scripts\ssh-remote.ps1 -Command "docker ps"
param(
[string]$Command = ""
)
$IdentityFile = Join-Path $env:USERPROFILE ".ssh\id_rsa_geonet_laptop"
$SshArgs = @(
"-i", $IdentityFile,
"-o", "IdentitiesOnly=yes",
"-m", "hmac-sha1",
"root@10.100.1.24",
"-p", "22"
)
if ($Command) {
$SshArgs = @("-o", "BatchMode=yes") + $SshArgs
$SshArgs += $Command
}
ssh @SshArgs