6/1/2018 Transfer Files Using PuTTY | IT@Cornell

Transfer Files Using PuTTY

How to install the PuTTy Secure client and use it to transfer files

This article applies to: Managed Servers

PuTTY is the CIT-recommended application for secure 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 Prompt.

1. 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.)

2. The PuTTY SCP (PSCP) client does not require installation in Windows, but runs directly from a Command Prompt window. the client program file to a convenient location in your Programs folders and make a note of the location.

3. To open a Command Prompt window, from the menu, click Run.

 In Windows 10, open the Start menu and cmd . Click the Command Prompt search result item that appears.

4. A Command Prompt window will open. To be sure the utility launches correctly from any in the Command Prompt window, set up an environment 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 ":\Program Files\PuTTy\", set up a path by entering set PATH="%PATH%;%ProgramFiles%\putty" the prompt in the Command Prompt window.

5. 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 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.) 6. 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.

7. 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 you open a Command Prompt window.

 Many users will not have sufficient administrative privileges to add or edit the Path environment variable permanently in their Windows System settings. In this case, contact the IT Service Desk for assistance in setting up PSCP, PuTTy, and Windows environment path variables.

Transfer files using PSCP

1. Open the Command Prompt window, and if necessary set up your path variable as shown above in Step 4.

2. To copy the local file c:\documents\info.txt as user username to the server.example.com with destination directory /tmp/foo, type at the prompt: https://it.cornell.edu/managed-servers/transfer-files-using-putty 1/2 6/1/2018 Transfer Files Using PuTTY | IT@Cornell

pscp c:\documents\info.txt [email protected]:/tmp/foo/info.txt

3. When prompted, enter your password for the server.

 Review the complete documentation  for PSCP and PuTTY on the PuTTY.org site.

https://it.cornell.edu/managed-servers/transfer-files-using-putty 2/2