使用Renci.SshClient进行端口转发 [英] Using Renci.SshClient to port forward

查看:267
本文介绍了使用Renci.SshClient进行端口转发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,

尝试完成以下任务:

尝试运行脚本以端口转发SSH连接[新增功能-Object Renci.SshNet.SshClient]<<<我能够连接,但我需要移植到跳转框。我到目前为止的脚本如下:

Trying to run a script to port forward an SSH connection [New-Object Renci.SshNet.SshClient] <<< I am able to connect but I need to port forward to the jump box. The script that I have thus far is below:

$ global:forwarded = New-Object Renci.SshNet.ForwardedPortLocal ("127.0.0.1",$ openport,xxxx,3389)  &NBSP;
$ Sesssion.AddForwardedPort($ forwarding);

$global:forwarded = New-Object Renci.SshNet.ForwardedPortLocal("127.0.0.1", $openport, x.x.x.x, 3389)    $Sesssion.AddForwardedPort($forwarded);

我收到的错误是:

New-
对象:找不到"ForwardedPortLocal"的重载和参数count:"4"。

New- Object : Cannot find an overload for "ForwardedPortLocal" and the argument count: "4".

注意:我已经安装了POSH SSH,运行PS v3。

NOTE: I have installed POSH SSH, running PS v3.

请指教。

AM

Adrian Mohamed

Adrian Mohamed

推荐答案

您发布的是错误的论坛。 在codeplex上发布软件创建者的论坛。

You are posting n the wrong forum.  Post in forum for the software's creator on codeplex.


这篇关于使用Renci.SshClient进行端口转发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆