Aim: I am trying to use SFTP through Paramiko in Python to upload files on server pc.
What I\'ve done: To test that functionality, I am using my localhost (127.0.0.
The second argument of SFTPClient.put (remotepath) is path to a file, not a folder.
So use file_name instead of '.':
ftp_client.put(local_path, file_name)
... assuming you are already in remote_path, as you call .chdir earlier.
To avoid a need for .chdir, you can use an absolute path:
ftp_client.put(local_path, remote_path + '/' + file_name)