Catch the prompt with regex (General questions)
Hello,
I'm looking for a regex that catches all login prompt for Solaris and Linux, that includes telnet and SSH.
Is there any?
Thanks in advance!
Hello,
I'm looking for a regex that catches all login prompt for Solaris and Linux, that includes telnet and SSH.
Is there any?
Thanks in advance!
by wodDamir
, (6719 days ago) @ emcemc
Hi emc,
I really can't tell. The prompt can be different on each system, even between the same vendors. You can try with something like this:
regex:[$ #>] $
However, you'll most probably have to try it on your side to see if it works.
Regards,
Damba
by emcemc
, (6718 days ago) @ wodDamir
Many thanks!
I have another question please: What is the best practice to validate the output I recieve from the other side? Is it the same for both SSH and Telnet?
For example: I'm looking for /tmp/a.txt file and I would like my VB application to validate it's exist indeed.
Thanks again!
by wodDamir
, (6718 days ago) @ emcemc
emc,
They should be the same. However, again, it could vary from different implementations of the server. The best practice is to try, and adjust the code to match the servers.
Regards,
Damba
by emcemc
, (6718 days ago) @ wodDamir
Thanks.
I tried it before writing my second post, and I saw that some of the output comes by recieved action (Telnet), while other comes with prompt_recieved action (SSH only?). I havn't found a generic solution yet.
I'm tring to find a generic solution, since I'm implementing a system that uses this dll for all kinds of unix and linux.
by wodDamir
, (6718 days ago) @ emcemc
emc,
In both casese (SSH and Telnet) the PromptReceived Event will be triggered if Prompt property is specified, and wodSSH receives it. When this occures, it's usually a sign that you can execute a new command.
As for receiving the data, you should use Received Event instead. Just call Receive method in order to receive all the data.
Ofcourse, this applies to non-blocking mode.
Regards,
Damba

Many thanks for your excellent support service. I can see why you have a long list of excellent testimonials on your website.

May I say how nice it is to work with components so complete and self-explanatory that using them in my application is as instinctive as though I wrote them myself?

Fantastic product by the way, it has helped us tremendously on a daily basis. Keep up the good work.

Not only wodSFTPdll is excellent, the service you have provided is outstanding and second to none!

The SFTP ocx is one of the finest pieces of programming I have seen. It worked out of the box...

Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.

Brilliant, even works on the mobile phone...

May I say how nice it is to work with components so complete and self-explanatory that using them in my application is as instinctive as though I wrote them myself?

Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.

You did a great job on wodSSH and wodSSHServer! I got a lot for very little money. Thanks!

