Transfer Files Using PuTTY
How to install the PuTTy Secure Copy client and use it to transfer files
This article applies to: Managed Servers
PuTTY is the CIT-recommended application for secure file transfer using SCP between Windows clients and Windows or Unix servers. Its secure copy utility is called PuTTy Secure Copy Protocol (PSCP).
PSCP and PuTTY are available from PuTTY.org.
Install PuTTY SCP (PSCP)
PSCP is a tool for transferring files securely between computers using an SSH connection. To use this utility, you should be comfortable working in the Windows Command Prompt.
- Download the PSCP utility from PuTTy.org by clicking the file name link and saving it to your computer. (If you also want to use the PuTTY shell program, you can download and save putty.exe to your computer as well.)
- The PuTTY SCP (PSCP) client does not require installation in Windows, but runs directly from a Command Prompt window. Move the client program file to a convenient location in your Programs folders and make a note of the location.
To open a Command Prompt window, from the Start menu, click Run.
cmd. Click the Command Prompt search result item that appears.
A Command Prompt window will open. To be sure the utility launches correctly from any directory in the Command Prompt window, set up an environment path so your system knows where to look for it. You'll use the pscp.exe location that you made note of in Step 2. For example, if you've saved the pscp.exe file to the folder "C:\Program Files\PuTTy\", set up a path by entering
set PATH="%PATH%;%ProgramFiles%\putty"at the prompt in the Command Prompt window.
- Entering the path in this way only lasts for the duration of the current session (that is, while you have the Command Prompt window open). To set up an environment variable path permanently, open the System control panel in Windows and click Advanced system settings, then click Environment Variables. In the Environment Variables window, select Path from the list of User variables, then click Edit. (If no Path variable is listed, click New.)
In the Edit User Variable window, click New. Type or paste the directory path for the PSCP utility you noted in Step 2 (for example,
C:/Program Files/putty) into the empty highlighted new line item.
- Click OK to save the new entry, then click OK again to close the Environment Variables window. The PSCP program file location is set up in your system and will not need to be entered each time you open a Command Prompt window.
Transfer files using PSCP
Open the Command Prompt window, and if necessary set up your path variable as shown above in Step 4.
To copy the local file c:\documents\info.txt as user username to the server server.example.com with destination directory /tmp/foo, type at the prompt:
pscp c:\documents\info.txt email@example.com:/tmp/foo/info.txt
When prompted, enter your password for the server.