There might be some scenarios, where you may want to transfer files from an Amazon EC2 instance to your local system or from local system to Amazon EC2 instance. There are various tools such as FileZilla, FTP etc. that can be used to transfer files to Amazon EC2 instance from local Windows or Linux system. Here, we would explain a very useful tiny tool “WinSCP” to transfer files to Amazon EC2 Linux instance from local system and vice-versa.
First of all, visit the official website of WinSCP and download this tool for Windows platform.
Steps To Transfer Files To Amazon EC2 Linux Instance From Local System
To transfer files to Amazon EC2 Linux instance from your local system, you need to perform the following steps:
- Just double-click the setup file and complete the installation of WinSCP tool using the default selections.
- Open the WinSCP console and fill the information such as Host name: Public IP or DNS domain name. User Name: User name of EC2 instance. Port: Default 22.
- Click the Advanced button. The new window will be displayed. Select the SSH in the left pane and then select Authentication.
- Here, you need to browse and select the keypair key (extension .ppk) that you have converted previously.
- Click OK to proceed and then click Login. On the Warning dialog box, click Yes to proceed.
- On the WinSCP console, select the local files from left pane and drag the files (that you want to transfer) in the right pane. The default EC2 file location is user’s home directory.
- To verify, connect your EC2 instance and list the files under user’s home directory. You should be able to see the files you have transferred from the local system to EC2 Linux instance as shown in the following figure.
Recommended: Various ways to connect EC2 Linux instance.
That’s all you need to transfer files between local system and Amazon EC2 instances. Hope, it helped you. If you have any query, please write us in the comment box, we will try to solve those.