I have been trying to override the default authentication scheme in a twisted conch module. Something that I thought I understood how to do. The script itself is the answer to this
question. I am subclassing SSHUserAuthClient
in the following way:
class ClientUserAuth(SSHUserAuthClient):
def getPassword(self, prompt = None):
return defer.succeed("*****")
and I am obviously replacing the SSHUserAuthClient
call with a call to my class in the script. For reasons I can't understand the script is not executing the getPassword
method in my class but the superclass getPassword
method. Does anyone know what I am doing wrong?
The only other change to the script I made is I added the following module import
from twisted.internet import defer
Thanks!
EDIT: Strangely the subclass method getPublicKey
is being called correctly. It is just the getPassword
method that is acting weird.