SFTP Implementation

SFTP Uploader implementation

class dput.uploaders.sftp.AskToAccept(uploader)

Paramiko policy to automatically add the hostname, but only after asking.

missing_host_key(client, hostname, key)

Called when an .SSHClient receives a server key for a server that isn’t in either the system or local .HostKeys object. To accept the key, simply return. To reject, raised an exception (which will be passed to the calling application).

class dput.uploaders.sftp.SFTPUploader(profile)

Provides an interface to upload files through SFTP.

This is a subclass of dput.uploader.AbstractUploader

initialize(**kwargs)

See dput.uploader.AbstractUploader.initialize()

shutdown()

See dput.uploader.AbstractUploader.shutdown()

upload_file(filename, upload_filename=None)

See dput.uploader.AbstractUploader.upload_file()

exception dput.uploaders.sftp.SftpUploadException

Thrown in the event of a problem connecting, uploading to or terminating the connection with the remote server. This is a subclass of dput.exceptions.UploadException.

dput.uploaders.sftp.check_paramiko_version(req)

Return whether paramiko satisfies the given a version requirement (req),

dput.uploaders.sftp.find_username(conf, ssh_conf)

Given a profile (conf) and an SSH configuration (ssh_conf), return the preferred username to login with. The profile takes precedence over the SSH configuration. It falls back to getting the logged in user’s name.