Hi,

   +-From: Preston Tollinger <[email protected]> --
   |_Date: Tue, 27 Jan 2009 16:16:11 -0800 ______________
   |
   |I have been unable to get an ssh key (generated with ssh-keygen) and
   |unencrypted to work.  Logging my UserInfo object (which should just be a
   |stub in that there should be no user interactions) I am seeing a request 
   |for a passphrase even though the key in unencrypted. Any suggestions are
   |appreciated.

   |-----BEGIN DSA PRIVATE KEY-----
   |MIIBugIBAAKBgQC+s5qRE5MpeKvYNVzZUqCE6EoNnl24YtWi+jOYIFOhuYViZukJ <snip>
   |Doing the following code wise:
   |JSch jsch = new JSch();
   |final byte[] prvkey = privatekey.getBytes("US-ASCII");
   |jsch.addIdentity(
   |  username,    // String userName                
   |  prvkey,      // byte[]  privateKey
   |  null,        // byte[] publicKey
   |  null  // byte[] passPhrase
   |);

What is 'privatekey'?  Is it a filename or contents of private-key file?
How about trying
  http://www.jcraft.com/jsch/examples/UserAuthPubKey.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
Fax +81-22-224-8773
Skype callto://jcraft/

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to