I have been stuck here for several days. I want to copy a file from my windows to a remote linux server and run the script there. I have a tool for ssh and scp. from which I can call the linux server via the command line, but when I call it through python, it becomes hanged.
pro=subprocess.Popen('ssh user@server')
pro.communicate()
there is a blank screen. everything I type then appears on the screen. I was hoping there would be a password prompt, but no. I was thinking about using a library like paramiko, pexpect, pyssh, but none of them are supported in Python 3
Any help is appreciated.
source
share