get data back without events/forms and with blocking mode? (wodSSH / wodSSH.NET)
by dirk, Saturday, February 08, 2020, 15:10 (1748 days ago)
Hi,
Can I use the wodSSH component in VB6 without having a form?
Meaning witout EVENTS?
Also if I set the ssh.blocking, set a ssh.command and do an ssh.connect, how can I get the result that I get from the server? (as I don't want to use events, nor a form)
dirk.
get data back without events/forms and with blocking mode?
by Jasmine, Saturday, February 08, 2020, 15:18 (1748 days ago) @ dirk
Hi Dirk,
yes, you can. Set Blocking to true, and don't use events.
To get results from the server, use Receive method.
Hope this helps!
Jasmine.
get data back without events/forms and with blocking mode?
by dirk, Saturday, February 08, 2020, 15:42 (1748 days ago) @ Jasmine
Hi
Set Ssh = New wodSSHCom
Set sshKeys = New WODSSHKeyLib.Keys
Ssh.LicenseKey = "my license"
Ssh.UseIPv6 = True
Ssh.DebugFile = "c:\sshdebug.log"
Ssh.HostName = strServer
Ssh.Columns = 200
Ssh.Port = 22
Ssh.Login = strUsername
Ssh.Password = strPassword
Ssh.Command = "date +" & Chr(34) & "%T" & Chr(34)
Ssh.Timeout = intTimeout
Ssh.Blocking = True
Ssh.Connect
strResponse = Ssh.Receive
Set sshKeys = Nothing
Set Ssh = Nothing
ssh_docheck = True
=> always gives a timeout, independantly of the actual set timeout. (and yes username/password are correct) What is even stranger is that I do not get a a "started session" on the screen of the server.
get data back without events/forms and with blocking mode?
by dirk, Saturday, February 08, 2020, 15:44 (1748 days ago) @ dirk
Hi
Set Ssh = New wodSSHCom
Set sshKeys = New WODSSHKeyLib.KeysSsh.LicenseKey = "my license"
Ssh.UseIPv6 = TrueSsh.DebugFile = "c:\sshdebug.log"
Ssh.HostName = strServer
Ssh.Columns = 200
Ssh.Port = 22
Ssh.Login = strUsername
Ssh.Password = strPasswordSsh.Command = "date +" & Chr(34) & "%T" & Chr(34)
Ssh.Timeout = intTimeout
Ssh.Blocking = True
Ssh.Connect
strResponse = Ssh.Receive
Set sshKeys = Nothing
Set Ssh = Nothing
ssh_docheck = True
=> always gives a timeout, independantly of the actual set timeout. (and yes username/password are correct) What is even stranger is that I do not get a a "started session" on the screen of the server.
And this is what the logging (of the component shows):
*** OnConnect received, err = 0
Got 41 bytes
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
get data back without events/forms and with blocking mode?
by Jasmine, Saturday, February 08, 2020, 15:46 (1748 days ago) @ dirk
Hi Dirk,
this is ASP page? If so, are you sure firewall isn't blocking outgoing requests other than 80/443 for IUSR_GUEST? In Desktop it works, but when running as restricted guest user, firewall is active. THis would explain timeout.
Jasmine.
get data back without events/forms and with blocking mode?
by dirk, Saturday, February 08, 2020, 15:47 (1748 days ago) @ Jasmine
Hi Dirk,
this is ASP page? If so, are you sure firewall isn't blocking outgoing requests other than 80/443 for IUSR_GUEST? In Desktop it works, but when running as restricted guest user, firewall is active. THis would explain timeout.
Jasmine.
VB6
No firewall issue.
On the same system running putty towards the server works fine, also fw is disabled
and no FW running on the Linux system either.
get data back without events/forms and with blocking mode?
by Jasmine, Saturday, February 08, 2020, 15:48 (1748 days ago) @ dirk
VB6 Desktop?
If so, remove all the code except blocking, hostname, protocol, login and password, and try to connect. Can you?
Jasmine
get data back without events/forms and with blocking mode?
by dirk, Saturday, February 08, 2020, 15:51 (1748 days ago) @ Jasmine
VB6 Desktop?
If so, remove all the code except blocking, hostname, protocol, login and password, and try to connect. Can you?
Jasmine
The protocol wasn't set, that caused the issue
Fixed now....thanks