Method setPassword on Session has no effect
Status: Alpha
Brought to you by:
ymnk
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.