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 , (6919 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, (6919 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 , (6919 days ago) @ marcxroma
Hi,
I just finished with sample.
Can you contact me to techsupport@weonlydo.com
Regards,
Alan
by wodAlan , (6919 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 , (6918 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, (6918 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, (6918 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 , (6917 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 , (6917 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 , (6916 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 , (6916 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 , (6916 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 , (6916 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
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?
Many thanks for your excellent support service. I can see why you have a long list of excellent testimonials on your website.
...with WOD's excellent support I was able to bypass Winsock and focus on the task at hand...
Not only wodSFTPdll is excellent, the service you have provided is outstanding and second to none!
Congratulations on an excellent product and first rate support!
Fantastic product by the way, it has helped us tremendously on a daily basis. Keep up the good work.
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
...what I really like is that wodSSH and wodSFTP components work excellently and are constantly being improved...
...wodFtpDlx was exactly what I needed, it worked, and it was priced right...
WeOnlyDo!COM will be the first stop I make should I require any further off-the-shelf components.