Download a file Linux to windows using SSH
Here we will discuss the way to copy files from linux server to windows machine by using SSH using windows command line.
- Download and Install PUTTY from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Go to command line and PUTTY location by using command cd YOUR_PUTTY_PATH
- Command syntax:
pscp <Path_To_Source_File> <Path_to_Destination>
and examples are as below
- Example command to copy file from local machine to server
pscp C:\Users\chandra\Documents\data.ext [email protected]:/data/chandra
- Example command from server to local machine
pscp [email protected]:/data/chandra C:\Users\chandra\Documents\data.ext
The major Advantage of using pscp command is that it gives facility to connect to your linux server using SSH details. It gives alternate of scp and rsync command of linux with the flexibility to use it in windows environment.
The drawback/disadvantage of using pscp command is that you can’t run multiple commands together. Although creating a batch file could be an option.
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments