Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scp from Linux to Windows [closed]

I am running a putty client on a Windows machine to connect successfully to a Linux box. Now I want to be able to copy a file from the Linux machine under the path /home/ubuntu/myfile to C:/Users/Anshul/Desktop on my local computer. The user at the Windows machine is anshul. I am giving the following command on putty but it is not working:

scp /home/ubuntu/myfile ip_address_of_windows_machine:C:/Users/Anshul/Desktop  

I think the path for the Windows machine is wrong. Please help as I have banged my head on a large number of forums but none seem to give correct path for Windows server. Don't suggest alternate options like WinScp

like image 457
user1344963 Avatar asked Apr 19 '12 19:04

user1344963


People also ask

Can you use SCP from Linux to Windows?

You can also use SCP to transfer files from one server to another, from your client. The syntax will look like this. If you use Windows 10 as client (from version 16.07) you can install the Linux subsystem and get a Ubuntu Bash including APT. With this you can use the syntax already shown.

Does SCP work on Windows?

You can run SCP on Windows via PuTTY. Use the SCP command via the Windows command line interface. You should start each command line with pscp -scp.

How do I enable SCP on Windows?

Select Environment > SFTP and enable Allow SCP fallback. Select SSH > Authentication, click Browse (...) in Private key file and select the previously generated private key. Click OK. Click Save, enter a name for the connection, and click OK.


2 Answers

This one worked for me.

scp /home/ubuntu/myfile username@IP_of_windows_machine:/C:/Users/Anshul/Desktop  
like image 52
emoblazz Avatar answered Sep 23 '22 16:09

emoblazz


Download pscp from Putty download page, then use it from Windows Command Line CMD as follows:

pscp username_linux_machine@ip_of_linux_machine:/home/ubuntu/myfile.ext C:\Users\Name\Downloads 

Copying starts once you enter the password for the Linux machine.

like image 32
Hesham Eraqi Avatar answered Sep 22 '22 16:09

Hesham Eraqi