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

Sandeep picture Sandeep · Jun 2, 2011 · Viewed 223.3k times · Source

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

Answer

Sandeep picture Sandeep · Jun 3, 2011

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