Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I copy a file from a remote server to using Putty in Windows? [closed]

How do I copy a file from a remote server to my local Windows system using a Putty session?

like image 388
Sandeep Avatar asked Jun 02 '11 16:06

Sandeep


People also ask

How do I copy a file from Windows to Linux using PuTTY?

File transfers can be done using PSCP (Putty Secure CoPy) or by using PSFTP (Putty Secure File Transfer Protocol). PSFTP can be launched from the Windows Start. This assumes you installed PuTTY in C:\Program Files\PuTTY (default). Note the “\” slash.

How do I copy from desktop to PuTTY?

Left-click inside the PuTTY terminal window near the text you want to copy. Holding down the left mouse button, drag your cursor across the text to select it, then release the button to copy it. Left-click on the destination Windows application where the pasting will occur. Right-click and select Paste or press Ctrl+V.

How do you get a file from a remote server to local?

To copy the files you will need to first invoke the SCP, followed by the remote username@IP address, path to file. If you do not specify the path, it is assumed as default in this case which will be the user's home directory, this will be followed the path where the file will be stored locally.


2 Answers

It worked using PSCP. Instructions:

  1. Download PSCP.EXE from Putty download page
  2. Open command prompt and type set PATH=<path to the pscp.exe file>
  3. In command prompt point to the location of the pscp.exe using cd command
  4. Type pscp
  5. use the following command to copy file form remote server to the local system

    pscp [options] [user@]host:source target 

So to copy the file /etc/hosts from the server example.com as user fred to the file c:\temp\example-hosts.txt, you would type:

pscp [email protected]:/etc/hosts c:\temp\example-hosts.txt 
like image 68
Sandeep Avatar answered Oct 05 '22 16:10

Sandeep


One of the putty tools is pscp.exe; it will allow you to copy files from your remote host.

like image 28
mah Avatar answered Oct 05 '22 18:10

mah