Hi,

   +-From: <[EMAIL PROTECTED]> ----------
   |_Date: Thu, 18 Oct 2007 10:12:14 -0400 __
   |
   |I am testing Jsch 0.1.35 on the command line and the test programs
   |generates a GSSException message everytime, even though the connection
   |is successful. For example, 

   |GSSException: No valid credentials provided (Mechanism level: Failed to
   |find any Kerberos Ticket)
   |        at 
sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:133)
   ...
   |        at 
sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
   |        at com.jcraft.jsch.jgss.GSSContextKrb5.init(Unknown Source)
   |        at com.jcraft.jsch.UserAuthGSSAPIWithMIC.start(Unknown Source)
   |        at com.jcraft.jsch.Session.connect(Unknown Source)
   |        at com.jcraft.jsch.Session.connect(Unknown Source)

I can not understand why GSSException is thrown from 
  GSSContextKrb5#init(byte[], int, int)
, which has been defined as follows,

  public byte[] init(byte[] token, int s, int l) throws JSchException {
    try{
      return context.initSecContext(token, 0, l);
    }
    catch(GSSException ex){
      throw new JSchException(ex.toString());
    }
  }

Are you really using the original source code?

   |Another alternative is to put gssapi-with-mic at the back of that
   |PreferredAuthentications option, or take it out completely. However, I
   |tried generating the documentation using javadoc but there is no method
   |that sets PreferredAuthentications. I looked into the source code and it
   |appears that this is a configuration that is set in Jsch.java. There
   |appears to be no way to set this class variable apart from changing the
   |source code. Technically, that would be a change to the Jsch source as
   |well. 

   Session session=jsch.getSession(user, host);
   ...
   session.setConfig("PreferredAuthentications", 
                     "publickey,keyboard-interactive,password");
   session.connect();


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to