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 , (6966 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, (6966 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 , (6965 days ago) @ marcxroma
Hi,
I just finished with sample.
Can you contact me to techsupport@weonlydo.com
Regards,
Alan
by wodAlan , (6965 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 , (6964 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, (6964 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, (6964 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 , (6964 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 , (6964 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 , (6963 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 , (6963 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 , (6963 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 , (6963 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
...wodFtpDlx was exactly what I needed, it worked, and it was priced right...
Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.
Thanks! We love your software and your great support!
This has been, by far, the best experience I have ever had dealing with a support entity in my long career in the technical arena
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.
Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.
It was no small factor, however, that your support in getting me up and running made me buy from you.
...with WOD's excellent support I was able to bypass Winsock and focus on the task at hand...
Your support is fantastic.
...wodFtpDlx was exactly what I needed, it worked, and it was priced right...