Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Machine can ssh but not scp [closed]

I started to use Docker Machine and I just saw there's a scp command. Like the documentation said:

$ docker-machine ssh dev 'echo A file created remotely! >foo.txt' $ docker-machine scp dev:/home/docker/foo.txt .

I did the same by creating a file and then:

docker-machine scp default:/home/docker/test.txt .

But I keep facing a status 1.

If I did the reverse, and upload a file to the container, I'm facing lost connection with a status 1. The command:

docker-machine scp mongo.tar default:mongo.tar

Please assume I'm not an expert with ssh and scp stuff.

like image 761
buzz2buzz Avatar asked Oct 16 '15 07:10

buzz2buzz


2 Answers

if you are running docker-machine from Docker Toolbox on Windows, there is an auto mounted volume where you can access to you host filesystem. By default, the mount point into the VM is /c/Users/ .

like image 127
Nicolas Pepinster Avatar answered Oct 24 '22 19:10

Nicolas Pepinster


This call worked for me:

scp xxx [email protected]:~

The default password is tcuser; alternatively you could use the mount point noted in the answer above.

like image 21
Connor Avatar answered Oct 24 '22 19:10

Connor