Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ssh from jsp server page

Posted on 2010-08-17
8
Medium Priority
?
1,875 Views
Last Modified: 2012-08-13
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
Comment
Question by:tittu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 92

Expert Comment

by:objects
ID: 33461670
easier to do it in a servlet.
or do it in a seperate class, and call that class from your jsp
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33461930
It might be simpler to just embed an SSH applet into the page:

http://javassh.org/space/Installing+the+Applet
0
 
LVL 16

Expert Comment

by:Valeri
ID: 33462202
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 

Author Comment

by:tittu
ID: 33617335
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
 
LVL 16

Expert Comment

by:Valeri
ID: 33617550
Did yoy try this examples?
http://www.jcraft.com/jsch/examples/
0
 

Author Comment

by:tittu
ID: 33743494
I need working demo
0
 
LVL 16

Accepted Solution

by:
Valeri earned 1500 total points
ID: 33743675
http://www.jcraft.com/jsch/examples/ScpTo.java
this is an working demo. scp to the remote host...
0
 

Author Closing Comment

by:tittu
ID: 33873454
working
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question