python Programming Glossary: sshuserauthclient
Best way to run remote commands thru ssh in Twisted? http://stackoverflow.com/questions/4617507/best-way-to-run-remote-commands-thru-ssh-in-twisted SSHConnection from twisted.conch.client.default import SSHUserAuthClient from twisted.conch.client.options import ConchOptions # setDebugging.. self.factory.commandConnected userauth SSHUserAuthClient os.environ 'USER' ConchOptions command self.requestService userauth.. password authentication you probably need to subclass SSHUserAuthClient and override getPassword to do something. Almost all of the..
twisted conch filetransfer http://stackoverflow.com/questions/5195427/twisted-conch-filetransfer import connect from twisted.conch.client.default import SSHUserAuthClient verifyHostKey def sftp user host port options ClientOptions.. 'port' port conn SFTPConnection conn._sftp Deferred auth SSHUserAuthClient user options conn connect host port options verifyHostKey auth.. see what it's connecting to so it can verify the host key. SSHUserAuthClient is the object that defines how the authentication will happen...
|