Telnet login failure detection - WeOnlyDo Discussion board

Telnet login failure detection (General questions)

by Arun, Monday, August 14, 2006, 17:50 (6676 days ago)

Hi Guys,

I have a simple question. We are building an application that uses the wodssh telnet piece to connect to a server. It works great when the user name and password is correct. But if the login credentials are wrong, there is no indication that something is wrong. If I use SSH it throws an exception and we are able to show a graceful message to the user. But with Telnet that somehow does not happen.

So is there any trick that you guys know or recommend us to do. We cannot ask the prompt or any string beforehand from the user.

Thanks
Arun

Re: Telnet login failure detection

by wodDrazen, Monday, August 14, 2006, 18:16 (6676 days ago) @ Arun

Hi Arun,


If the wrong login/password combination is used with the remote server, an error will be generated (SSH protocol only).
If you are using Telnet Protocol, you can find out under Received Event what was receive from server by calling Receive Method.
If you receive something like Login incorrect than user entered incorrect login or password.

Hope this helps.


Regards,
Drazen

Re: Telnet login failure detection

by Arun, Monday, August 14, 2006, 18:30 (6676 days ago) @ wodDrazen


If you receive something like Login incorrect than user entered incorrect login or password.

Hi Drazen,

Thanks for your reply. The problem is, I think the Login incorrect string can be customized. So we will not be able to detect the failures. Also another related question is, lets say for example an user is running Japanese OS (or any non-English language) with a telnet server. Will the strings returned be in English or Japanese?

Thanks for your help
Arun

Re: Telnet login failure detection

by wodSupport, Monday, August 14, 2006, 20:17 (6676 days ago) @ Arun

Arun,

there's no way to automate invalid login in Telnet protocol. That's how telnet works - in theory it can be anything, from automated menu systems up to console shell access, that's all telnet. And there's no common response. If there was one, we would include it internally to wodSSH/wodTelnetDLX.

So, you're on your own here to try most common answers from the server.

Kreso

Re: Telnet login failure detection

by Arun, Monday, August 14, 2006, 21:09 (6675 days ago) @ wodSupport

Thanks Kreso,

Your response time is fabulous as always :)
Yes you are correct. Since you must have done research during your implementation, I wanted to confirm my suspicions about Telnet.

Thanks
Arun