Hi,

I went through the Shell.java code.

However, it seems to accept a password from a Swing component and only then
it connects to the desired remote machine.

I want to access the input / output streams before even we are successfully
connected and I will manually provide the passwords or encrypted data as is
expected.

Can this be done ? If yes, can you guide me to the appropriate resources.

Regards,

Prasad Shindikar


On Fri, Nov 27, 2009 at 12:25 PM, Prasad Shindikar <
prasad.shindi...@gmail.com> wrote:

> Hi,
>
> Thanks for your prompt reply.
>
> I am not expecting the protocol to send me a "Password: " message. However,
> I am expecting to read it on the created output stream.
>
> There is a catch here in my case, since the remote machine to which we
> intend to connect might expect a simple (not encrypted) password or might
> expect something entirely different through some security gateway.
>
> To support for the above functionality, I need to read the output stream to
> read what happens on the remote product prompt and take necessary actions.
>
> Let me also go through the links that you have pointed out. Thanks once
> again for the same.
>
> Regards,
>
> Prasad Shindikar
>
>
>
> On Fri, Nov 27, 2009 at 8:29 AM, Atsuhiko Yamanaka <y...@jcraft.com>wrote:
>
>> Hi,
>>
>>   +-From: Prasad Shindikar <prasad.shindi...@gmail.com> --
>>   |_Date: Thu, 26 Nov 2009 16:49:08 +0530 ________________
>>    |
>>   |However, since I cannot know that before hand, if I am able to read
>>   |"Password:" from the stream; I will provide a password else I will
>> provide
>>   |the encrypted data.
>>
>> In SSH protocol, such a "Password: " message will not be sent on the
>> stream, and before sending the password, encrypted data bi-directional
>> streams will be established.
>>
>>   |Hope I am being clear here.
>>   |Is there some way in which I can do this using Jsch ? I would be very
>> happy
>>   |if I can break the atomic connect() method to prompt me for password
>> before
>>   |successfully connecting.
>>
>> Yes, you can.
>> Try
>>  http://www.jcraft.com/jsch/examples/Shell.java
>>
>>
>> Sincerely,
>> --
>> Atsuhiko Yamanaka
>> JCraft,Inc.
>> 1-14-20 HONCHO AOBA-KU,
>> SENDAI, MIYAGI 980-0014 Japan.
>> Tel +81-22-723-2150
>>    +1-415-578-3454
>> Skype callto://jcraft/
>>
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to