Back to product page

ForwardHost property


Determines the hostname that data will be forwarded to with SSH tunneling.

Type

String. Represents hostname where remote server should connect to.

Syntax

  • C#
  • VB.NET
String ForwardHost {get; set; };

Property ForwardHost As String

Remarks

Together with ForwardPort, this property will make wodSSH.NET create tunnel through his connection with server to some other host/port, thus enabling you to make your data travel encrypted through network - between your host and remote server with SSH.

Please note that if you set
 
ForwardHost = "127.0.0.1"
 

(default value) then tunnel that is created will end up directly on remote side - because it is seen as localhost interface on remote side.

If you put some real IP value in ForwardHost property, in that case only connection between your computer and remote server with SSH will be encrypted. Connection between remote server with SSH, and server you pointed to with ForwardHost property will be plaintext.

However, if you look beyond this, you will see that you could be able to connect to, for example, your local network on work which is behind firewall. You could connect to your firewall server with wodSSH.NET, and make it point to '192.168.1.1' which is valid IP address for firewall server (typical scenario). That way you will be able to access data on computer which isn't available by connecting directly.

wodSSH.NET will never open any local sockets for listening automatically - when you use ForwardHost and ForwardPort properties, you still need to use Send and Receive methods to send/read data. Only difference is that remote server does not spawn shell for you - rather, it forwards data to 3rd service you specify.

All of the above applies only if you have proper Login and Password combination, of course.

Platforms

Windows