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.
18 lines
406 B
18 lines
406 B
# Buka SSH shell ke reverse proxy |
|
# Usage: .\scripts\ssh-remote.ps1 |
|
# .\scripts\ssh-remote.ps1 -Command "docker ps" |
|
|
|
param( |
|
[string]$Command = "" |
|
) |
|
|
|
$HostAddr = "10.100.1.24" |
|
$SshPort = 22 |
|
$SshMac = "hmac-sha1" |
|
$SshUser = "root" |
|
|
|
if ($Command) { |
|
ssh -o BatchMode=yes -m $SshMac "${SshUser}@${HostAddr}" -p $SshPort $Command |
|
} else { |
|
ssh -m $SshMac "${SshUser}@${HostAddr}" -p $SshPort |
|
}
|
|
|