Error using wodSSH.NET in my asp.net 2.0 web a (wodSSH / wodSSH.NET)
I tried to use wodSSH.NET in my asp.net 2.0 application and was encountering below error message everytime i run the web page:
“NOT ALLOWED IN THIS STATE. CONNECT FIRST”.
Please suggest appropriate solution to the problem. Below is the code snippet. ( XXX represents valid inputs to the tool). I am not getting error in Connect method which makes me believe that connection is there. I get error in Execute method.
km.Load( key.ssh , XXX )
Ssh1.Authentication = WeOnlyDo.Client.SSH.Authentications.PublicKey
Ssh1.Hostname = XXX
Ssh1.Login = XXX
Ssh1.TempAuthorization = 633261552344062500 | WfBgutWHckSB7FzRerZKb98q5Lw=
Ssh1.PrivateKey = km.PrivateKey(type)
Ssh1.Authentication = WeOnlyDo.Client.SSH.Authentications.PublicKey
'Ssh1.Command = XXX //commented
Ssh1.PrivateKey = km.PrivateKey(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey)
'Ssh1.Blocking = True //commented
'Ssh1.StripANSI = True //commented
Ssh1.Connect()
'Ssh1.WaitFor( regex:[$ #>] $ ) //commented
'Ssh1.DataReady = 0 //commented
result = (Ssh1.Execute( XXX ))