My Wodssh1 is not working as a telnet client. - WeOnlyDo Discussion board

My Wodssh1 is not working as a telnet client. (wodSSH / wodSSH.NET)

by Luis Galiano, Tuesday, August 31, 2004, 13:58 (7177 days ago)

Good afternoon!

I'm having a problem with my connector object. I'm trying to use it in telnet protocol mode, but the event is not receiving any data. Could you help me, please! Thank you,

Luis Galiano

The source code is the following:

wodSSH1.Disconnect
wodSSH1.HostName = *****
wodSSH1.Login = *****
wodSSH1.Password = *****
wodSSH1.Port = 23
wodSSH1.Protocol = Telnet
wodSSH1.Timeout = 30
wodSSH1.Command echo Hello
wodSSH1.Connect

Re: My Wodssh1 is not working as a telnet client.

by wodSupport, Tuesday, August 31, 2004, 14:01 (7177 days ago) @ Luis Galiano

Luis,

assuming you're running it as a script - please set Blocking=True.

Are you able to use events? Does StateChange event fire? How about Connected event?

Regards.

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Tuesday, August 31, 2004, 14:10 (7177 days ago) @ wodSupport

Luis,

assuming you're running it as a script - please set Blocking=True.

Are you able to use events? Does StateChange event fire? How about Connected event?

Regards.

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Tuesday, August 31, 2004, 14:13 (7177 days ago) @ Luis Galiano

Thak you for your very quick help!

That is correct. The StateChange event is working right. I did the change you told me (blocking=true) and now, the Disconnected event is firing once, at the begining. The Connected event is not working.

Luis,

assuming you're running it as a script - please set Blocking=True.

Are you able to use events? Does StateChange event fire? How about Connected event?

Regards.

Re: My Wodssh1 is not working as a telnet client.

by wodSupport, Tuesday, August 31, 2004, 14:29 (7177 days ago) @ Luis Galiano

Are any errors returned in Connected or Disconnected event?

Can I try to connect with your code? Can you please send email to techsupport@weonlydo.com so I can try to duplicate your problem exactly, using your code?

Thanks,
Kreso

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Tuesday, August 31, 2004, 14:39 (7177 days ago) @ wodSupport

Thank you Kreso,

I finally received a time out error. Unfortunately, the telnet server is in a intranet. Anyway I'll send to you the code. You can uuse a standard telnet address to duplicate it. Thank you for your help. I'm developing using Visual Basic 6.0. The server is a AIX UNIX server.


Regards,

Luis


Private Sub Command1_Click()

wodSSH1.Disconnect
wodSSH1.Protocol = Telnet
wodSSH1.Blocking = True
wodSSH1.HostName = palmito
wodSSH1.Login = arf254
wodSSH1.Password = arf254
wodSSH1.Port = 23
wodSSH1.Timeout = 30
wodSSH1.Command = echo Hello
wodSSH1.Connect
wodSSH1.Receive

End Sub

Private Sub wodSSH1_Connected(ByVal ErrorCode As Integer, ByVal ErrorText As String)

MsgBox conectado

End Sub

Private Sub wodSSH1_CryptoInformation(ByVal Protocol As String, ByVal RemoteName As String, ByVal SCcipher As String, ByVal CScipher As String, ByVal Keys As String, Accept As Boolean)

MsgBox criptografía

End Sub

Private Sub wodSSH1_Disconnected()

MsgBox desconectado

End Sub

Private Sub wodSSH1_HostFingerprint(ByVal Fingerprint As String, Accept As Boolean)

MsgBox fingerprint

End Sub

Private Sub wodSSH1_PromptReceived()

MsgBox prompt

End Sub

Private Sub wodSSH1_Received(ByVal ByteCount As Integer)

MsgBox recibido

End Sub

Private Sub wodSSH1_StateChange(ByVal OldState As WODSSHLibCtl.StatesEnum)

MsgBox cambio de estado

End Sub

Are any errors returned in Connected or Disconnected event?

Can I try to connect with your code? Can you please send email to techsupport@weonlydo.com so I can try to duplicate your problem exactly, using your code?

Thanks,
Kreso

Re: My Wodssh1 is not working as a telnet client.

by wodSupport, Tuesday, August 31, 2004, 14:40 (7177 days ago) @ Luis Galiano

Luis,

I can try your code against our UNIX server. But I do have a question: are you 100 sure telnet server is available for you? If you go to command prompt, and enter there
[code]telnet your_server_name[/code]

does it work? What response do you get? Is it UNIX?

Kreso

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Tuesday, August 31, 2004, 14:46 (7177 days ago) @ wodSupport

Yes, I'm sure. When I enter this code, I get the following:

>AIX Version 4.
>(c) Copyrights by IBM and others 1982 1996.
>login:

Luis,

I can try your code against our UNIX server. But I do have a question: are you 100 sure telnet server is available for you? If you go to command prompt, and enter there
[code]telnet your_server_name[/code]

does it work? What response do you get? Is it UNIX?

Kreso

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Tuesday, August 31, 2004, 16:54 (7177 days ago) @ Luis Galiano

Yes, I'm sure. When I enter this code, I get the following:

>AIX Version 4.
>(c) Copyrights by IBM and others 1982 1996.
>login:

Luis,

I can try your code against our UNIX server. But I do have a question: are you 100 sure telnet server is available for you? If you go to command prompt, and enter there
[code]telnet your_server_name[/code]

does it work? What response do you get? Is it UNIX?

Kreso

Re: My Wodssh1 is not working as a telnet client.

by wodSupport, Tuesday, August 31, 2004, 23:52 (7177 days ago) @ Luis Galiano

Luis,

can you please create new VB project, add reference to 'WeOnlyDo! SSH/Telnet Component' to your project, and then paste this code and run it. Does it work for you. I just tried it here - it does ok for me.
[code]Private Sub Form_Load()
Dim wodSSH1 As wodSSHCom
Set wodSSH1 = New wodSSHCom

wodSSH1.Protocol = Telnet
wodSSH1.Blocking = True
wodSSH1.HostName = ***
wodSSH1.Login = ***
wodSSH1.Password = ***
wodSSH1.Port = 23
wodSSH1.Timeout = 30
wodSSH1.Command = echo Hello
wodSSH1.connect
Debug.Print wodSSH1.Receive

End Sub[/code]
Let me know.
Kreso

Re: My Wodssh1 is not working as a telnet client.

by Luis Galiano, Wednesday, September 01, 2004, 12:09 (7176 days ago) @ wodSupport

Hello Kreso,

I tried out your solution and It worked. Thank you very much for your help and your patience.

Greetings,

Luis

Luis,

can you please create new VB project, add reference to 'WeOnlyDo! SSH/Telnet Component' to your project, and then paste this code and run it. Does it work for you. I just tried it here - it does ok for me.
[code]Private Sub Form_Load()
Dim wodSSH1 As wodSSHCom
Set wodSSH1 = New wodSSHCom

wodSSH1.Protocol = Telnet
wodSSH1.Blocking = True
wodSSH1.HostName = ******** (modified)
wodSSH1.Login = test1
wodSSH1.Password = ****** (modified)
wodSSH1.Port = 23
wodSSH1.Timeout = 30
wodSSH1.Command = echo Hello
wodSSH1.connect
Debug.Print wodSSH1.Receive

End Sub[/code]
Let me know.
Kreso

Re: My Wodssh1 is not working as a telnet client.

by wodSupport, Wednesday, September 01, 2004, 14:31 (7176 days ago) @ Luis Galiano

Luis,

it worked? Excellent!

Just for my curiosity, what was the problem with your approach?

Regards,
Kreso