EC2: Chapter-3: How to transfer files to a Linux instance from Windows using WinSCP, in 6 easy steps


If you are someone who always used WinSCP (or other secure copy applications) to move your code to Linux instances, this must be a cakewalk for you. The only difference is that you will have to use the private key (.ppk format) for authentication. I thought I'd save your time :)

For the beginner:

Prerequisites:
1. You have an AWS account :) Otherwise refer to Chapter1.
2. You have launched a Linux instance on EC2 and it is currently running. You have the public DNS name for it. Refer to EC2:Chapter-1 .
3. You have converted the .pem private key provided by EC2 to a .ppk file using PuTTYgen and have saved on your computer. Refer to EC2:Chapter-2 .
4. Your Linux instance has scp installed. Just run scp on you instance to check.
5. You have the latest WinSCP installed on your Windows machine. Otherwise download from https://winscp.net/eng/download.php

Step-1: Open WinSCP. Click on New Site in the Login wizard


Step-2: Copy the public DNS name of your instance to Host Name field. Use the user name for your Linux instance. In our example for the Amazon Linux AMI it is ec2-user


Step-3: Click on Advanced button. Go to SSH -> Authentication





Step-4: Click on browse button. Choose the private key (.ppk) saved on your computer when you create the instance and converted to .ppk using PuTTYgen. Refer to Chpater3. Click on OK.




Step-5: Click on Login.  (If needed, you can click on Save button first if you want to save this configuration for the life of this instance).



Step-6: Once the connection is established, you can navigate to the local folder you want to on left pane and drag and drop the file to the right pane (to your target instance).





Comments

Popular posts from this blog

EC2-Chapter-2: HOW to connect to a Linux instance through SSH using PuTTY, in 6 easy steps

EC2: Chapter-1: HOW to create and launch a Linux instance using Amazon EC2, in 10 easy steps