Ubuntu Machine 1 -- A live Ubuntu instance, temporary. Ubuntu Machine 2 -- The target machine with an external hard drive connected.
I want to copy files from Ubuntu Machine 1 to that external hard drive on Ubuntu Machine 2. How do I do that?
I've got the ip addresses of both machines.
Ubuntu Machine 1 is in a VM environment. I made some test images there. I want to copy them to a physical external drive so I can actually apply the image on a physical test machine. I've got the image file on that first machine, on a second hard drive, formatted ext4. Windows can't read that. I do have a separate Ubuntu computer (Ubuntu Machine 2 in this scenario) set up that can write to the external drive. I need to get that image from the Ubuntu VM to the physical Ubuntu computer's external drive.
Got something copying. I used this site to enable ssh on the target computer: https://vikashazrati.wordpress.com/2008/02/03/quicktip-transferring-files-between-two-ubuntu-systems/
Pinging either way already worked. I had to install and enable ssh on that target computer. ssh'ing from the live ubuntu machine to the target computer worked. I had to
chown on the second hard drive on the live ubuntu machine, using sudo too:
sudo chown -R ubuntu: /media/ubuntu/long-number-list
Otherwise I got permissions errors.
scp did need -r since it's a directory I guess. Otherwise I got an error about "not a regular file." I didn't try to get it on the physical external drive, just to the Desktop on the target machine, although it wouldn't be much more work to get there now.
Looks like it's copying the whole folder/directory over, not copying the contents with the containing folder. Afterwards I can turn ssh off on the target machine to keep it secure.