简体   繁体   中英

Can not copy files From Azure VM to local Windows

I want to copy file from Azure Linux VM to local Windows PC. Actually I remember, I could do this perfectly with the same command but now when I run the cmd it shows message as 100% done but when I go to tmp directory, I dont see the file there. Here is the cmd I give on Linux VM:

scp -r mlopenedx@138.91.116.170:/edx/var/log/tracking/tracking.log /tmp/

And this is output I get:

tracking.log 100% 70KB 70.0KB/s 00:00

But when I see tmp folder I dont see the file.Can any on suggest me the answer. I have tried things like: giving Home folder ~/ instead of /tmp/ .

Also tried below cmd:

sudo scp -i ~/.ssh/id_rsa mlopenedx@MillionEdx:/edx/var/log/tracking/tracking.log /tmp/

The easiest way to do this is to run pscp from windows like this:

pscp mlopenedx@LINUXVMIP:/edx/var/log/tracking/tracking.log c:/someExistingFolder/tracking.log

to have pscp command you need to install PuTTY .

your command looks wrong as one of the paths needs to be Windows valid path C:/Folder/Folder/File.ext . If you are executing that command from Linux VM and 138.91.116.170 is your Linux vm IP address than you are copping files locally - you can try finding your log file on that linux in \\tmp\\ folder. In order for that to work from remote Linux to local Windows you would need public IP for your windows or some sort of tunnel that would allow this connection.

Also you are adding -r recursive copy and you are pointing to file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM