I am trying to push a file using SFTP protocol. I am using Python3 with pysftp library. The code is very simple:
host = "100.100.100.1" #the host ip
passw = "myPass" #password
user = "myUser" #username
path = "/destination/"
localpath = "D:/myFolder/"
sftp = pysftp.Connection(host, username=user, password=passw)
sftp.put(localpath, path)
sftp.close()
however as result I have this error message:
No hostkey for host 100.100.100.1 found
What am I doing wrong? Naturally the ip address and other sensible data in the example code are not real. Thank you for the help.