Problems with Demo / PortForwarding - WeOnlyDo Discussion board

Problems with Demo / PortForwarding (General questions)

by Michael, Tuesday, February 09, 2010, 20:50 (5400 days ago)

Hi!

After purchasing the SSH-Server component, I am evaluating the SSH-Client as well.
Currently I am using free sharpSSH implementation on client-side.
It works well, but I am missing compression.
Now I downloaded your client component and tried to manage portforwarding to run. But it does not work.
I modified the example c# file just with my credentials and server adresses, but I cannot get a connection.
No error occurs, but I cannot connect to my remote service.
Project with sharpSSH works fine..
I am using Win7 x64 (but compiled for x86).
Any Idea? Or is the Demo limited to not to do forwarding?

Greets,

Michael

Re: Problems with Demo / PortForwarding

by woddrazen, Tuesday, February 09, 2010, 21:12 (5400 days ago) @ Michael

Hi Michael,


There is no such limitation in DEMO version.

It works for me without any problem. You mention that you cannot connect to your server. What happens if you try other wodSSH.NET samples?

Are you still unable to connect to server or other samples works and you can connect?

Let us know how it goes.


Regards,
Drazen

Re: Problems with Demo / PortForwarding

by Michael, Tuesday, February 09, 2010, 21:21 (5400 days ago) @ woddrazen

Hi Drazen,

the other samples seem to work (console).
Sometimes, I get an InvalidOperationException (but not always..).
Help! :)

Regards,

Michael

Hi Michael,


There is no such limitation in DEMO version.

It works for me without any problem. You mention that you cannot connect to your server. What happens if you try other wodSSH.NET samples?

Are you still unable to connect to server or other samples works and you can connect?

Let us know how it goes.


Regards,
Drazen

Re: Problems with Demo / PortForwarding

by Michael, Tuesday, February 09, 2010, 21:40 (5400 days ago) @ Michael

Hi,

I could concretize the problem:
I can connect to a prompt with login and password.
I cannot connect to a server which only allows PortForwarding with publicKey.
Do I have to do additonal settings just to tell ssh.net only to do forwarding?

Greets,

Michael

Hi Drazen,

the other samples seem to work (console).
Sometimes, I get an InvalidOperationException (but not always..).
Help! :)

Regards,

Michael

Hi Michael,


There is no such limitation in DEMO version.

It works for me without any problem. You mention that you cannot connect to your server. What happens if you try other wodSSH.NET samples?

Are you still unable to connect to server or other samples works and you can connect?

Let us know how it goes.


Regards,
Drazen

Re: Problems with Demo / PortForwarding

by Michael, Tuesday, February 09, 2010, 21:56 (5400 days ago) @ Michael

Some more information:
Connection is stable until I try to access the tunneled service.
Then connection breaks, ExitSignal is empty, ExitStatus is 0.

Greets,

Michael

Re: Problems with Demo / PortForwarding

by woddrazen, Tuesday, February 09, 2010, 22:11 (5400 days ago) @ Michael

Michael,


So you can connect now to your server? Which service you are forwarding?


Drazen

Re: Problems with Demo / PortForwarding

by Michael, Tuesday, February 09, 2010, 22:13 (5400 days ago) @ woddrazen

Hi,

yes it is connected unless I do not try to route traffic through the tunnel. I am trying to forward RDP from local port 2222 to remote 3389.

Michael

Michael,

So you can connect now to your server? Which service you are forwarding?

Drazen

Re: Problems with Demo / PortForwarding

by Michael, Tuesday, February 09, 2010, 22:49 (5400 days ago) @ Michael

Okay, some bytes travel through the tunnel.
It exits in the else-clause of the asyncReceive Function:

[code] private void asyncReceive(IAsyncResult ar)
{
int i = 0;
try
{
i = socket1.EndReceive(ar);
}
catch (Exception)
{ }
if (i > 0)
{
// be sure that the component isn't still in the connecting procedure
while (ssh1.State > WeOnlyDo.Client.SSH.States.Disconnected && ssh1.State != WeOnlyDo.Client.SSH.States.Connected);
//if the connecting procedure resulted with disconnection, bail out
if (ssh1.State == WeOnlyDo.Client.SSH.States.Disconnected)
return;
ssh1.Send(socketbuffer, 0, i);
socket1.BeginReceive(socketbuffer, 0, socketbuffer.Length, System.Net.Sockets.SocketFlags.None, new AsyncCallback(asyncReceive), this);
}
else
ssh1.Disconnect();

}[/code]

Any idea what this could cause?

Re: Problems with Demo / PortForwarding

by woddrazen, Wednesday, February 10, 2010, 00:08 (5400 days ago) @ Michael

Michael,


You are using Windows RDP? When you RDP to some host, Windows user where you connect (RDP) automatically log off from his account.

So if you are running SSH server there, server is probably stopped and you cannot connect. Can you please check that?


Drazen

Re: Problems with Demo / PortForwarding

by Michael, Wednesday, February 10, 2010, 08:12 (5399 days ago) @ woddrazen

Hi Drazen,

unfortunately that is nor the problem.
First, using sharpSSH it works. Second, when trying to forward port 80 to a webserver I see that some data is transferred but then it hangs and a disconnect occurs.

Regards,

Michael

Michael,


You are using Windows RDP? When you RDP to some host, Windows user where you connect (RDP) automatically log off from his account.

So if you are running SSH server there, server is probably stopped and you cannot connect. Can you please check that?


Drazen

Re: Problems with Demo / PortForwarding

by woddrazen, Wednesday, February 10, 2010, 10:11 (5399 days ago) @ Michael

Michael,


Actually we have component for SSH port forwarding. Name of component is wodSSHTunnel.

Can you maybe consider using that component? It works in VB.NET and C# without any problem.


Drazen

Re: Problems with Demo / PortForwarding

by Michael, Wednesday, February 10, 2010, 12:06 (5399 days ago) @ woddrazen

Hi Drazen,

tried the tunnel component, works as well.
But i think it is strage that it does not work with ssh.net client.
I will try with this component then..
Do I get a discount when I already bought another component? ;)

Thanks,

Michael

Michael,


Actually we have component for SSH port forwarding. Name of component is wodSSHTunnel.

Can you maybe consider using that component? It works in VB.NET and C# without any problem.


Drazen

Re: Problems with Demo / PortForwarding

by woddrazen, Wednesday, February 10, 2010, 12:19 (5399 days ago) @ Michael

Michael,


Can you please send us email to techsupport@weonlydo.com.

We will see what we can do about discount.


Drazen