wodssh and javascript html (wodWebServer / wodWebServer.NET)
Could someone show me a javascript sample that connects to a ssh server, executes a command ( ls -al ) and shows the result?
Could someone show me a javascript sample that connects to a ssh server, executes a command ( ls -al ) and shows the result?
by wodAlan , (6994 days ago) @ marcxroma
Hi,
I'm not good in javascript.
Can you show me some snippet and I will try to do something.
BTW, I just wanted to let you know that I'm working on this.
Regards,
Alan
by marcxroma, (6994 days ago) @ wodAlan
I used your sample wodssh.html . And would like to have two samples:
1.) a linux cammand ls -al that is executed imediatly after the connect, with result shown to browser ssh terminal window
2.) add a button that executes a linux command when clicked.
by wodAlan , (6994 days ago) @ marcxroma
Hi,
I just finished with sample.
Can you contact me to techsupport@weonlydo.com
Regards,
Alan
by wodAlan , (6994 days ago) @ wodAlan
Hi,
You can try to add this code:
Under Button click you can add following code:
wodSSH1.Send( ls -al \r\n );
Maybe you have trouble with sending data ls -al , or sending enter/new line.
I think that ( \r - carriage return and \n new line) is most important thing in this code.
Of course you can call Send Method immediately after Connect Method, if you set Blocking Property to True.
Regards,
Alan
by marcxroma , (6993 days ago) @ wodAlan
Hi,
You can try to add this code:
Under Button click you can add following code:
wodSSH1.Send( ls -al \r\n );
Maybe you have trouble with sending data ls -al , or sending enter/new line.
I think that ( \r - carriage return and \n new line) is most important thing in this code.
Of course you can call Send Method immediately after Connect Method, if you set Blocking Property to True.
Regards,
Alan
by marcxroma, (6993 days ago) @ marcxroma
Sorry for the mistaken post.
I wanted to know if it is possible to have the window with the wodssh object scroll down automatically while new text arrives?
I use the wodssh object with a command tail -f logfilename.log to have it the log files on the linux server. Is it possible to have the window scroll don as the logfile grows?
by Jasmine, (6993 days ago) @ marcxroma
Marc,
but wodSSH doesn't have any windows of its own - it's just hidden send/receive engine. So, whatever is used to display the data is responsible for scrolling.
So, you should consult javascript docs to see if you can make textarea (or whatever is used for display) scroll. I think this is possible, but I can't give you exact solution.
Regards,
Kreso
by marcxroma , (6992 days ago) @ Jasmine
Hi again,
I have a question about “installing” the wodssh.ocx.
I do not want to use an installer for distribution of the wodssh.ocx. I tried to “distribute” it by specifying in the <OBJECT CODEBASE=”./wodssh.ocx” ….> in the html page (the wodssh.ocx was put onto the webserver).
It seams to be downloaded and “installed” but I get a “30 days evaluation expired” message even if it is not true, because it works on the machine where I used the installer.
So on a computer where I did not use your installer I get the expiration message on a computer I used the installer it works fine. My question is: Is it only a problem of the “Demo” version?
Will the licensed version work without using an installer and if so how would I “embed” the license key?
Thank you
by wodDrazen , (6992 days ago) @ marcxroma
Hi Marc,
You cannot distribute DEMO version. Licensed version will work with CAB and LPK file. LPK file is instead of license key.
Would you be so kind to check out wodTelnetDLX helpfile Getting starte in HTML :
http://www.weonlydo.com/TelnetDLX/Help/GettingStarted_HTML.html
which explains how to do it - and then just change it to work with wodSSH.
Hope this helps.
Regards,
Drazen
by marcxroma , (6991 days ago) @ wodDrazen
Hi,
is it possible to get the connection errors by javascript?
I managed to retrive the status text by the connected event,
(status = wodSSH1.StateText (wodSSH1.State);)but I would like to get also possible error messages while connecting. (for example: wrong password,....). I do see this messages in the javascript debugger, when clicking in the error simbol of the browsers status bar.
thank you
by wodAlan , (6991 days ago) @ marcxroma
Hi marcxroma,
I'm not sure that I can help you about this I'm not so good in javascript. Besides that I think you need to find out how to pull out that information from IE and put it in some pop up or something that you need. IE gives that information from Received Event, right?
So, I think some workaround about IE can accomplish that, but I haven't some direct answer.
If I find something, I'll let you know.
Regards,
Alan
by marcxroma , (6991 days ago) @ wodAlan
Ok, ifound the solution. Ipost it here, it might be useful.
...
...
try
{
wodSSH1.Connect();
}
catch (e)
{
//alert( e is: + e)
//alert( e.number is: + (e.number & 0xFFFF));
//alert( e.description is: + e.description);
//alert( e.name is: + e.name);
alert(e.message);
}
...
...
by wodDrazen , (6991 days ago) @ marcxroma
Hi Marc,
We are glad that you solve your problem and share solution with us.
Maybe adding StateText or State Property under StateChange Event can help you also.
The StateChange Event is fired each time wodSSH's internal state changes.
The State property holds the state of the current connection between the wodSSH component and the remote server and StateText will returne a text description of a value given by the State Property.
Hope I helped.
Regards,
Drazen
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.
We have recently completed a large 1200+ location project where reliable Telnet and SSH connectivity was required. wodSSH worked flawlessly and allowed our staff to complete our project ontime and within budget.
We have recently completed a large 1200+ location project where reliable Telnet and SSH connectivity was required. wodSSH worked flawlessly and allowed our staff to complete our project ontime and within budget.
I can only hope I will have the pleasure to work with other products by "We Only Do" in the future.
Your customer service was excellent, and I will look at your products in the future for precisely that reason.
...with the SFTP interface you produced, everything was so simple to understand, we were able to start coding almost immediately!
You have been great as far as offering support is concerned and has been extremely responsive to both support requests and suggestions for product enhancements.
The wodCrypt product is great and we appreciate your effort to add support for UNIX Crypt.
...not only that you provide these components at very reasonable cost, your responsiveness to emailed technical questions is simply outstanding...
Congratulations on an excellent product and first rate support!