I have two Ubuntu instances running on two different virutal nodes (Docker). I want to copy a file from one node to another quite a few times from my python script. For now, I am testing with scp
if the other machine is accessible. Both machines can ping
each other but the problem is scp
of ssh not working.
I have tried:
Both of the machines are virtual and copy of the
ssh
files not possible - so in future ssh certificates can be used.scp
doesnot work because it asks for password, when I giveroot
password, givesinvalid password
error.
Please help me with some pointers which allows me to copy a file from one machine to another.
EDIT
scp
command: scp sourcefile.txt root@xxx.xxx.xxx:/root/dev
P.S. Apologies if there is some very basic solution for this and I cannot see it, I am new to this setup.