Re: username/password prompting recognition - WeOnlyDo Discussion board

Re: username/password prompting recognition (General questions)

by woddrazen, Wednesday, April 16, 2008, 15:42 (6066 days ago) @ birchsr

Hi birchsr.


You can try without using Login and Password Property. Using WaitFor Method to wait for Login and Password prompt and send info using Send Method.

Here is example:[code]
Set ssh1 = New wodSSHCom

ssh1.HostName = linux.weonlydo.com
ssh1.Authentication = authKeyboardInteractive
ssh1.Protocol = Telnet
ssh1.Blocking = True
ssh1.Timeout = 10
ssh1.Connect

'//Debug.Print ssh1.Receive
ssh1.WaitFor linux.weonlydo.com login:
ssh1.Send somelogin + vbLf
ssh1.WaitFor Password:
ssh1.Send somepassword + vbLf

Debug.Print ssh1.Receive
Debug.Print ssh1.Receive
Debug.Print ssh1.Receive[/code]
To find out which prompt is received and what should be added in WaitFor Method using Receive Method. Put Receive Method (maybe more than one) just after Connect Method and you can find out which prompt is received for Login and same should be done for Password. Put that Prompt in WaitFor Method and send login and password using Send Method.

You have issue with DOS Telnet server so maybe you should use vbCrLf instead vbLf in Send Method.

Let us know how it goes.


Regards,
Drazen


Complete thread: