SSH.NET icon indicating copy to clipboard operation
SSH.NET copied to clipboard

Creating ProxyJump

Open amitkumarmahajan opened this issue 7 years ago • 5 comments

Hi,

Is it possible to create proxyjump using ssh.net? I have tried using constructor which required all the parameters but no luck. I tried using all the proxytypes options. Getting error as - Remote host actively refused connection.

Current scenario is - Windows(Where C# program with SSH.NET executing) - Linux Proxy Host - Linux Server to SSH

Any example of same scenario is greatly appreciated.

amitkumarmahajan avatar Oct 25 '18 15:10 amitkumarmahajan

Open an SshClient to your Linux Proxy Host and open a LocalForward to the SSH-Port of your Linux Server. Then you can open an SshClient to this Local Forwarding.

darinkes avatar Dec 05 '18 11:12 darinkes

I am expecting code sample or to do it from code using ssh.net library. Sample code using proxy command is appreciated. As said in post I tried using constructor option for using proxy.

amitkumarmahajan avatar Dec 21 '18 17:12 amitkumarmahajan

I do not know if you succeed to connect, but I'm working on a modification on the module Posh-SSH to do it. This module is written in c# and I am going to write a first connection to connect to the bastion, and create a LocalForwardPort and then connect on the local port to connect to the destination server.

chrisptree avatar Oct 21 '22 18:10 chrisptree

any update @chrisptree ?

msftphleiten avatar Sep 18 '23 06:09 msftphleiten

I already finished the modifications and it works, but I did not take the time to create a merge request.

chrisptree avatar Sep 18 '23 13:09 chrisptree