Dart Home | PowerTCP SFTP & SSH for .NET | Custom Development | Reply | PowerTCP SFTP & SSH for .NET Topics | Forums |
Author | Forum: PowerTCP SFTP & SSH for .NET Topic: SSH Tunneling |
moeck From: Cologne, Germany Posts: 10 Member Since: 05/29/18 |
posted May 29, 2018 7:50 AM Hi, I try to connect to a sftp-server via a Gateway using SSH tunneling. Searching with the keyword "tunnel" in the documentation I got the LocalPortForwarder-Class as result among others. Am I right, if I create a ssh-connection to the gateway, establish a localportforwarder to a local port, e.g. 6000 afterwards and then create a sftp connection to the target server via the defined port 6000? If I'm wrong how can I solve this? regards moeck |
Nick B (Admin) From: Utica, NY USA Posts: 619 Member Since: 05/25/10 Extra Support Options Custom Application Development |
posted May 29, 2018 1:32 PM Hello, If I'm understanding what you're saying, yes. If you want to tunnel an SFTP client through an SSH Gateway to an SFTP server that only the SSH Gateway can access, our product is well-suited to your requirement. First, connect to an SSH Gateway and authenticate, then you can call Ssh.Connection.CreateLocalPortForwarder(), specifying the local port/IPEndPoint you want clients to connect to, and then the IP/hostname and port of the EndPoint that you want the SSH Gateway to connect 'the clients that connect to your machine on the port specified previously' to. Then if you connect to your local endpoint, the connection will be redirected to the EndPoint specified by the last two arguments of CreateLocalPortForwarder(). |
moeck From: Cologne, Germany Posts: 10 Member Since: 05/29/18 |
posted May 30, 2018 7:51 AM Thank you for the answer so far. To authenticate to the ssh gateway I use an username and a private key. When I call the method Authenticate() with the corresponding SshLoginData object I get the Exception "Support for this private key format is not implemented." As written in the PowerTCP documentation "Public Key/Private Key Overview" I exported the private key in OpenSSH format. I know that the public key was given to the server in putty format. But I think that doesn't matter, does it? What else can cause this exception? |
moeck From: Cologne, Germany Posts: 10 Member Since: 05/29/18 |
posted May 30, 2018 8:40 AM Solved the problem. By accident I set the pem property of the SshLoginData to the path of the private key not the key itself. |
Jamie Powell (Admin) From: Rome, NY USA Posts: 448 Member Since: 03/13/07 Extra Support Options Custom Application Development |
posted May 30, 2018 10:56 AM Thank you for the update! Have a great day. Regards, Jamie |
Reply | PowerTCP SFTP & SSH for .NET Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |