Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1933
  • Last Modified:

ssh from jsp server page

The requirement is to do ssh/scp from JSP server Page to a remote hand held devices where the
hand device has embedded linux platform with only ssh server running,

the JSP application must be able to manage/ administer the remote hand held terminals via ssh
so that the end user can simply open the browser and can manage the remote hand held gadgets,

is there any example code using SSH classes in JSP.
0
tittu
Asked:
tittu
1 Solution
 
objectsCommented:
easier to do it in a servlet.
or do it in a seperate class, and call that class from your jsp
0
 
CEHJCommented:
It might be simpler to just embed an SSH applet into the page:

http://javassh.org/space/Installing+the+Applet
0
 
ValeriCommented:
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
tittuAuthor Commented:
But i need some functional code example running from JSP to connect remote unix box thru SSH
by click a button in the browser.

Does anyone have any idea or functional code sample where:
JSP that does ssh connection to a remote unix box and runs a shell script.

I tried using jsch classes and get Session can not be resolved to a type and jsch can not be resolved errors. I added jar file to every path I know of.

I've tried RunTime.exec successfully to my PC but seem not to get the remote UNIX connection syntax right.

Doesn't help that I'm learning by example either. Most qoogle result code examples are totally buged out.
0
 
ValeriCommented:
Did yoy try this examples?
http://www.jcraft.com/jsch/examples/
0
 
tittuAuthor Commented:
I need working demo
0
 
ValeriCommented:
http://www.jcraft.com/jsch/examples/ScpTo.java
this is an working demo. scp to the remote host...
0
 
tittuAuthor Commented:
working
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now