Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Running ssh command from java and then answering password prompt

807588Mar 16 2009 — edited Mar 17 2009
Hi,
I have a situation that has not solved yet. I am running ssh command from unix terminal without any problem, and then i enter password.

For example :


[oracle@fuata]:/export/home/oracle> ssh -N fuat@10.155.127.20 -L 9901:127.0.0.1:9999
Password:

It is working. I have question that how can i perform this in java? I am thinking that i can run ssh command by using Runtime Class, it is ok. But how can i answer the password? I am a bit confused. Is there any example looks like this?

Thanks for responses.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2009
Added on Mar 16 2009
5 comments
241 views