Quantcast
Channel: Copy a file between two Ubuntu instances - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Copy a file between two Ubuntu instances

$
0
0

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:

  1. Both of the machines are virtual and copy of the ssh files not possible - so in future ssh certificates can be used.

  2. scp doesnot work because it asks for password, when I give root password, gives invalid 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.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>