I have been trying to do scp a file to a remote computer by using password. I used this code:
import os
import scp
client = scp.Client(host="104.198.152.xxx", username="nxxx", password="xxxxxx")
client.transfer("script.py", "~/script.py")
as it's suggested in How to scp in python?, but it outputs:
File "script.py", line 5, in <module>
client = scp.Client(host="104.198.152.153", username="nazarihome", password="mohMOH13579")
AttributeError: 'module' object has no attribute 'Client'
I also tried other ways that people suggest and seems that none of them works. Does anybody have a suggestion that really works?
p.s. I have to use password not the key if your answer depends on that.