Hi, my intention is to upload file from my PC to my pythonanywhere periodically, I use ssh to send file to my account, but receive Authentication failed message. I am not sure if anything I have doing wrong. Please help.
My coding is as follows:
localfilepath = "local_test.txt" remotefilepath = "/home/jjhui/stock_app/plotlydash/local_test.txt"
import paramiko ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client.connect(hostname='ssh.pythonanywhere.com',port=22,firstname.lastname@example.org',password='xxxxxxx') s = ssh_client.open_sftp() s.put(localfilepath,remotefilepath)
I use my pythonanywhere.com password as the ssh password.
BTW, other than ssh, is there any other method I can use to upload local file periodically to pythonanywhere?