Friday 11 October 2019

How to copy files from Linux machine to Windows machine

Hi,

This is what you need to do:

1. Install putty on your local windows machine via below link

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

2. By default, it will get installed at below location (for 64 bit machine)

C:\Program Files\PuTTY



3. Copy your key file i.e. .ppk file at the above location (see, baseline.ppk as e.g. copied above)

4. Now, open command window from this same location (Shift + Right Click, select Open command window here Option)

5. Run the below command (say, to copy 165.zip from home location on the Linux server to this location)

 .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:165.zip .

Notice the . at the end, this actually means, copy to this current location. You can give any actual path here to copy to that location(say, D:\Here)

  .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:165.zip D:\Here
Likewise,  if you want to copy the file not from the home directory but from other location on the server, say, /home/ec2-user/rahul/, below command can be used

  .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:/home/ec2-user/Test.txt D:\Here
Done!

Hope you find it useful.. let me know in the comment section in case of any query!


No comments:

Post a Comment