PuTTY is used to establish to secure connection when connecting to the remote server. It allows you to transfer files from remote server to your local system. PuTTY cannot itself transfer or download files, it only connects to a remote server and local machine. To download the file in local system you need pscp.exe , which is a component of PuTTY. This tool provides a encrypt connection to get the file via PuTTY from remote server to your local system.
Table of Contents
Transfer Files from Linux to Windows computer
Linux and Windows are two different operating systems. PuTTY plays a significant role to in connecting these two. When you use PuTTY on Windows to connect to a remote Linux server, you are essentially connecting to the Linux environment. This allows you to access the Linux terminal, execute commands and manage various functionalities.
Note: In the Linux terminal forward slash (/) is used to navigate the path of the file directory. In the Windows command prompt backward slash (\) is used to navigate the path of the file directory.
When downloading files in Windows using pscp, the path of file is specified with backward slash (\).
Now we can start the process to file downloading by using PuTTY:
Download PuTTY on Windows:
PuTTY SSH(Secure Shell), a network protocol establish secure connection to copy files from remote server to local system. Make sure to Download the latest version of PuTTY.
Establish the PuTTY SSH Session:
Open the PuTTY and enter the username or IP address of Linux server in the Host name section. Select the connection type to SSH and port to 22.
Click Open to start the connection.
Now you successfully, establish login to remote Linux server via SSH, from which you want to transfer file to your local system.
Open PSCP (Secure Copy Protocol):
During SSH connection, use the pscp.exe tool, a file transfer protocol allows to copy file between computers. you need to open the separate command line Window to run it. Open the command prompt on Windows computer, Go to Start Menu>Type in the search bar command prompt and press enter. The command prompt window will appears.
Then type cd\ path_to\pscp.exe on command line, and replace the path to with the exact path of pscp.exe. By default, while installing putty it is generally installed in “C:\Program files\putty\pscp.exe” but if you change the putty installation location then enter the exact location of pscp.exe file. Then press enter.
Execute the PSCP command:
Run this command:
pscp.exe username@host:/path_to/filename C:\path_to\filename
username: Replace username with your username on remote server.
host: Replace host with the hostname or IP address of the remote server.
path_file: Replace path file with exact location of file in Linux server.
filename: It is the name of the file you want to transfer.
path_to/download: Replace it with the destination location to save the file on your computer.
Download file from remote server to local system:
After running the pscp command, then press enter. You will be prompted to enter the username and password for secure authentication and access. After this file is transfer from a Linux server and download in your local computer in specified destination folder.
PuTTY allows secure remote connection and download and transfer files from the remote server. pscp command is used for this purpose. First you have to establish the session with remote server, and run the pscp command to download file.