Secure Copy File from remote server via scp and os module in Python
问题 I'm pretty new to Python and programming. I'm trying to copy a file between two computers via a python script. However the code os.system("ssh " + hostname + " scp " + filepath + " " + user + "@" + localhost + ":" cwd) won't work. I think it needs a password, as descriped in How to copy a file to a remote server in Python using SCP or SSH?. I didn't get any error logs, the file just won't show in my current working directory. However every other command with os.system("ssh " + hostname +