Examples fails - WeOnlyDo Discussion board

Examples fails (wodSSH / wodSSH.NET)

by Carlos, Wednesday, February 22, 2006, 14:52 (6647 days ago)

Hi, (sorry for my English)

I'm working with your SSH control in .NET and i have some problems:

1. Examples don't work correctly, when use blockin mode app's don't connect and timeout fires. In non blocking mode, no more than one command executes, and echo is cut.

2. When i tried my own code same occurs, i can't connect on blockin mode, but connect fine on non blockin. Using 'command' property i can execute a command fine, but with 'send' method i can't, server don't execute command and echo is not complete, it's like the command was not send completly.

I can connect to the server fine with putty, can you help me?.

Re: Examples fails

by wodDrazen, Wednesday, February 22, 2006, 15:05 (6647 days ago) @ Carlos

Hi Carlos,

What kind of server is that. Could you please go to command prompt and type:
telnet yours server 22
and tell us first line returned?

Hope I helped.

Regards,
Drazen

Re: Examples fails

by Carlos, Thursday, February 23, 2006, 08:19 (6646 days ago) @ wodDrazen

Hello Drazen,

System is Suse Linux Enterprise Server, kernel 2.6.5-7.147-smp
telnet first line: SSH-1.99-OpenSSH_3.8p1

Sample Terminal VB Sample or Terminal CS Sample return:
[code]
CONNECTING

CONNECTED
Last login: Thu Feb 23 09:06:00 2006 from 192.168.0.17

carlos@icazar:~> ls

m
mbin
m
mDocuments
m
mpublic_html
m

m
[/code]
and stop here, i can only disconnect.

Sample Use Prompt Event Sample return:
[code]
TextBox1This sample will connect to server specified in Form1_Load sub,
and execute few commands, one by one.
Command output is received and shown in messageboxes.
---
This is a sample of using Prompt property and PromptReceived event
CONNECTED
RECEIVED SOME DATA...
[/code]
and stop here again.

and Waitfor and Execute sample, makes System Timeout Exception:

[code]
Ssh1.Blocking = true;
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto;
Ssh1.Timeout = 10;
Ssh1.Connect();

String a;

a = Ssh1.WaitFor( $ ); <---- Exception !!!
[/code]

thanks for your help!!!!

Re: Examples fails

by wodDrazen, Thursday, February 23, 2006, 09:59 (6646 days ago) @ Carlos

Hi Carlos,

After you send some command ( ls ) what is a prompt you expecting?
I can't see in prompt carlos@icazar:~> character $ maybe there is your problem.

Could you try to changer:
a = Ssh1.WaitFor( $ );
with:
a = Ssh1.WaitFor( regex:[$ #>] $ );

Hope I helped.

Regards,
Drazen