Jsch allows to provide the private and public keys as byte arrays instead of files (Jsch.addIdentity()…) You shouldn’t need streaming for your private key (or known hosts…). Does this help you?
I am referring this old thread http://sourceforge.net/p/jsch/mailman/message/3862205/ which asks for a way to provide a private key as InputStream instead of a file.
On Mon, May 5, 2014 at 7:56 PM, Moshe Elisha <email@example.com> wrote:
I know this is a (very) old thread but it is relevant for me.
Looking at the code and the changelog I can't see that this was implemented.
Was it implemented? Is it planned?
I need this feature as our private keys are stored in the DB and we don't want to write them to disk just in order to use them in JSCH.