URGENT - Autodisconnect - WeOnlyDo Discussion board

URGENT - Autodisconnect (General questions)

by Fahad, Saturday, July 30, 2005, 09:30 (7055 days ago)

I am using you component wodSSH.NETin VB.net, when i connect to my server and execute some command, it disconnect after executing it. What I want to do that it should not disconnect after executing my command and wait for other command to be executed. I use Timeout property but its does'nt work properly. Pleas help me in this regard, if you can provide me with some code.

My Code
=======
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Ssh1.Login = TextBox3.Text
Ssh1.Password = TextBox4.Text
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto
Ssh1.Timeout = 30
Ssh1.Connect(TextBox2.Text)
Ssh1.Command = ls -lt & Chr(10)
End Sub

It should wait for my other command and then disconnect.

Re: URGENT - Autodisconnect

by wodSupport, Saturday, July 30, 2005, 11:52 (7055 days ago) @ Fahad

Fahad,

set Blocking = True, blocking property will make sure component doesn't return to your code until it connects.

Also, Command property isn't for what you think it is, please read helpfile. You can set Command property before calling connect so that component overrides shell (and executes your commands instead) upon connection.

You should use Send, Execute and Waitfor methods after you connect to send commands.

Re: URGENT - Autodisconnect

by Fahad, Monday, August 01, 2005, 07:49 (7053 days ago) @ wodSupport


You should use Send, Execute and Waitfor methods after you connect to send commands.

Can u plz provide me the code of above mention methods....urgent..i m looking forward for your copporation


Fahad

Re: URGENT - Autodisconnect

by wodSupport, Monday, August 01, 2005, 23:20 (7053 days ago) @ Fahad

Fahad,

everyone wants code that will solve their problem exactly, but I don't know what is your problem exactly. I explained what you need to do, there are samples available for our products, please look at them, try and combine. Did you change your code as I suggested? What happened?

I can help you with specific problem, but general issues on how to use certain methods/properties can be found in our helpfile - please look there.

Regards,
kreso