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.

 

pscp <Path_To_Source_File> <Path_to_Destination>

 

and examples are as below

  1. Example command to copy file from local machine to server
pscp C:\Users\chandra\Documents\data.ext user@server.cutehits.com:/data/chandra 
  1. Example command from server to local machine
 pscp user@server.cutehits.com:/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.

Related posts:

The following two tabs change content below.

Chandra Shekhar

Consultant at Infogain
Chandra Shekhar is a LAMP Developer,Thinker,Blogger and currently working as Magento(Ecommerce) specialist.. I am always open to learn new things in LAMP as well as other newer technology. In the journey of my last 9 years of web and product development, I have decided to share my knowledge and experience to Open Source Community in 2011. In this regard I have started CuteHits.com. Since then I am actively sharing my knowledge on various LAMP technology through CuteHits.com’s technical ... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)