import subprocess
import os
p = subprocess.Popen(["scp", "test.txt", "root@x.x.x.x:/workspace/waic/data"])
sts = os.waitpid(p.pid, 0)
print('Done')
I got this message:
Host key verification failed.
lost connection
I want to copy files from a remote machine, but I don't know how to add a '-p 33' port argument. If I add it after 'scp -p 33', it gives another error:
No such file or directory: 'scp -p 33'