Fixed the first problem ;but in the second case i downloaded the jrexec
program but what i understand is
it simply takes host name, username, command and password and will
execute on the remote node
while when i run the ssh client from command prompt if i give a command
ssh FallBackToRsh=yes StrictHostKeyChecking=yes -l pat shell.isp.com date
then if the ssh server of shell.isp.com is down and if rsh is
conffigured to work without password
it will execute the date command on shell.isp.com using rsh and return
This acts like a backup infrastructure. Is the same thing achiveable
using JSCH after seeing the code
i found that you have a property name StrictHostKeyChecking so why cant
have you a property
for FallBackToRsh also.
Atsuhiko Yamanaka wrote:
> +-From: Inderbir Pall <inderbir.pall@...> --
> |_Date: Wed, 14 Jun 2006 14:48:59 +0530 ___________
> |1. How can i get rid of the error which is every time displayed "The
> |authenticity of the host can't be established"
> |I think the problem is that since my known hosts file is not passed to
> |jsch it is occuring, in that case is
> |there a function similar to jsch.addIdentity to add known hosts file
> |also to the jsch enviornment
> Please refer to 'examples/KnownHosts.java'.
> |2. When i run a remote command from prompt i pass a flag
> |FallBackToRSH=true since if ssh is not working
> |it should fallback to RSH. Can i do something like this in jsch by
> |setting some property.
> There is not such a functionality, but it will be easy to implement it
> by using JRexec.
>  http://www.jcraft.com/jrexec/
> Atsuhiko Yamanaka
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
> Fax +81-22-224-8773
> Skype callto://jcraft/