“Failed to load HostKeys” warning while connecting to SFTP server with pysftp
问题 I wrote a Python script to connect to SFTP server using key authentication. It connects to server successfully but shows the following warning (see below). What does it mean and how to remove it. What changes has to made in code? My code: import os import pysftp import socket import paramiko import time import os.path import shutil IP = "127.0.X.X" myUsername = "USERNAME" port = 22 cnopts = pysftp.CnOpts() cnopts.hostkeys = None import os privatekeyfile = os.path.expanduser("C:\\Users\\Rohan\