Problem with SSH component - WeOnlyDo Discussion board

Problem with SSH component (General questions)

by tg, Sunday, June 01, 2008, 12:36 (6019 days ago)

Hi all,
I have the following problem:

I call to ssh.connect method and then it's going to ssh_connected event. Inside this connected event, there is no errors (ErrorCode is 0). Everything is ok till now.
The problem is that if this connected event subroutine is empty (no code inside), then nothing is happened later with the ssh. Only if I put a msgbox inside this event subroutine, the ssh works fine. It looks that I must interrupt the ssh flow (with msgbox or something else)

What is the problem? How can I solve it? I do not want to use this msgbox interrupt.

I'm using it with VB6.
Thanks in advance!

Re: Problem with SSH component

by woddrazen, Sunday, June 01, 2008, 15:04 (6019 days ago) @ tg

Hi,


There is no need to call MsgBox in Connected Event. Received Event should be fired when connection is established with server.
Did you try to send command or receive output in Received Event? If you are using Prompt Property then you should use PromptReceived Event to send command.

All information how to do that you can find in wodSSH samples which comes with component installation. You can find VB6 samples in component Samples folder.

Please try it and let us know how it goes.


Regards,
Drazen

Re: Problem with SSH component

by aa, Tuesday, June 03, 2008, 14:51 (6017 days ago) @ woddrazen

Thanks!

I read the PDF very deeply.
I've missed the waitfor method. Now it seems to work fine!