Cook Book — pysftp 0.2.9 documentation
pysftp.readthedocs.io › en › release_0You can also specify additional connection options using the pysftp.CnOpts object. These options are advanced and not applicable to most uses, because of this they have been segmented from the Connection parameter list and made available via CnOpts obj/parameter. Host Key checking is enabled by default. It will use ~/.ssh/known_hosts by default. If you wish to disable host key checking (NOT ADVISED) you will need to modify the default CnOpts and set the .hostkeys to None.
API — pysftp 0.2.9 documentation
pysftp.readthedocs.io › en › release_0hostkeys (paramiko.hostkeys.HostKeys|None) – HostKeys object to use for host key checking. Parameters: knownhosts (filepath|None) – initial value: None - file to load hostkeys. If not specified, uses ~/.ssh/known_hosts. Returns: (obj) CnOpts - A connection options object, used for passing extended options to the Connection. Raises: HostKeysException –
pysftp Documentation - Read the Docs
media.readthedocs.org › pdf › pysftpknown_host format files by using .load method. importpysftp cnopts=pysftp.CnOpts() cnopts.hostkeys.load('path/to/your/extra_knownhosts') with pysftp.Connection('host', username='me', password='pass', cnopts=cnopts): # do stuff here For both the knownhost parameter and the load argument, pysftp expands user, so you can use tilde notation in your pathing.