login about faq

I developed a sshtunnel application for my office with CHILKATSSHLib_TLB. But it fails data communication after few minutes every time. i could not find the reason therefore i coded a simple tunnel application to test. and I found that even without connecting to the real sshtunnel success := sshTunnel.BeginAccepting(listenPort); sends messages as tunnel connecting is success

MESSAGES i gets from my test application with delphi xe3 (and delphi 7)

  1. Tunnel OK
    DllDate: Aug  5 2012
    UnlockPrefix: 30-day trial
    Username: xxxx
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    listenPort: 3316
    destPort: 1433
    destHostname: myDbServer11111.com
    Listen thread started.

Result = 1

there is no server called myDbServer11111.com
there is no server called ''

so how it does show as Success?

asked Sep 27 '12 at 13:34

chilkat's gravatar image

chilkat ♦♦

The reason BeginAccepting is successful is because no connection to the destination host:port happens during the BeginAccepting method call.

The BeginAccepting method starts a background thread that will begin accepting incoming connections on the localhost:listenPort. BeginAccepting returns success if the background thread is started, the socket created, and the background thread has begun listening on the listenPort.

At some future point in time, an incoming connection to listenPort might arrive. The background thread accepts it and establishes a connection to the SSH server host:port (not the destination host:port). SSH port forwarding is setup so that data sent to the SSH server is then forwarded (by the SSH server) to the destination host:port, which in your case is myDbServ11111.com.

Note that even when an SSH tunnel is established, it is not your app's background thread that is connected to the destination host:port, it is the SSH server that makes this connection.


answered Sep 27 '12 at 13:41

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 27 '12 at 13:34

Seen: 1,353 times

Last updated: Sep 27 '12 at 13:41

powered by OSQA