Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#19 Method setPassword on Session has no effect

open
nobody
None
5
2006-03-06
2006-03-06
No

The class

com.jcraft.jsch.Session

has a method called

setPassword()

Calling this method has no effect because the password
is stored but never used. Instead whereever user
credentials are needed, userinfo
(com.jcraft.jsch.UserInfo) is called.

UserInfo is an Interface which does not seem to have a
default implementation in the JSch package, so if the
setPassword() method is to be retained for
compatibility, it's not too easy to come up with simple
2 line patch. I therefore refrain from the attempt.

Maybe the method should at least be deprecated or throw
an Exception, but what's happening today is that
authentication just fails and it is hard to find out why.

Discussion