I need to connect to secure FTP server from windows-7 machine. I have user credentials to login to the server and its working when i secure ftp using winscp.
I have tried using the pysftp.connection()
but its failing for host_keys
loading.
import pysftp
try: sftp = pysftp.Connection('zzz.yyy.com', username='usr_nm', password='xxxxx') except Exception as err: print('sftp failed', str(err))
below is the error message...
sftp failed No hostkey for host zzz.yyy.com found. C:\ProgramData\Anaconda3\lib\site-packages\pysftp__init__.py:61: UserWarning: Failed to load HostKeys from C:\Users\ppp.ssh\known_hosts. You will need to explicitly load HostKeys (cnopts.hostkeys.load(filename)) or disableHostKey checking (cnopts.hostkeys = None).