How Do I Upload Files Using Putty
- Provide feedback for data recipe
Groundwork
You can transfer files into and out of a Linux EC2 example from a local computer running Windows by either of these methods:
- WinSCP provides a graphical user interface (GUI) that allows you to drag and drop files between your local reckoner and your AWS case. This is like to using Windows File Explorer.
- PuTTY Secure Copy is run from the Windows Control Prompt
Processing using an EC2 Instance requires that you move the files to be processed to the instance, then remove the products created earlier the example is terminated.
Prerequisites
-
- You must have created a PuTTY Private Central (.ppk) file every bit described in the How to Connect to your EC2 Instance using PuTTY V1.one data recipe. The .ppk file will be used in Transferring Files Using WinSCP and Transferring Files Using PuTTY Secure Copy (PSCP).
Find Your EC2 Example Public DNS
- Open the AWS Instances window in the EC2 Management Panel ( 1 ).
The Public DNS of your EC2 case displayed in this window ( two ) volition be used in the Transferring Files Using WinSCP department and the Transferring Files Using PuTTY Secure Re-create (PSCP) section.
Transferring Files Using WinSCP
Download and install WinSCP.
-
- Click on Installation package and then use the default installation options.
- Start WinSCP by clicking on the Desktop icon.
- WinSCP Login window.
- Click on New Site ( i ).
- In the Host proper name box ( 2 ), enter the Public DNS displayed in your EC2 Direction Panel Instances window.
- In the User name box ( 3 ), type "ubuntu."
- Click on the Advanced button.
- Advanced Site Settings window
- Under SSH ( i ), click on Authentication ( 2 )
- Under Private key file ( 3 ), click on the … push button and navigate to the folder where your PuTTY Private Key (.ppk) file is located.
- Select the .ppk file.
- Click on the OK push button to close the Advanced Site Settings window.
If y'all want to relieve your settings to use again later on, click on the Save button in the WinSCP Login window and name the settings.
Annotation: If you stop your EC2 case and restart it, a new Public DNS will be assigned. You will demand to copy and paste this into the WinSCP "Host proper noun" box before you tin connect.
-
- Click the Login push button
- The first time you lot connect to your instance, you will be asked nearly connecting to an unknown server.
- Click the Yeah push to keep.
- Later yous have continued, the left pane of the window will display the file contents of your computer and the right pane displays the contents of your EC2 case.
- Drag and drop files from your reckoner into your EC2 instance to process. When processing is complete, drag and drop the products from EC2 to your computer.
Important: Files must be transferred from your EC2 instance to your calculator before you terminate the instance!
Transferring Files Using PuTTY Secure Re-create (PSCP)
Open a Windows "Command Prompt" window
Windows ten
-
- Click on the Kickoff push button at the extreme left of the Taskbar.
- Ringlet down the list of Apps to the Windows System folder.
- Aggrandize the folder and click on Command Prompt.
- Or, click the Start push and blazon "cmd." Select "Control Prompt" from the search results.
- The Control Prompt window will open.
Windows 7
-
- Click on the Commencement button at the left of the Taskbar.
- In the Search programs and files box, type "cmd." Select "Command Prompt" from the search results.
- The Control Prompt will open up.
Note: When using PSCP to transfer files between your figurer and your EC2 instance, your "PuTTY Private Key (.ppk)" file must be in the binder you are working in, or you must provide a path in the PSCP control to the folder the file is located. For example, if "AWSkey.ppk" file is stored in the binder named "keys," include this path in the PSCP command:
C:\Users\username\keys\AWSkey.ppk
Copy a File Into Your EC2 Instance
At the Windows command prompt type (detect where spaces are placed):
C:\> pscp -i yourkey.ppk yourfilename ubuntu@public_DNS:/home/ubuntu/
Example: To movement the file S1A_EW_GRD.cipher from your Windows Downloads binder to the /home/ubuntu directory of your EC2 instance.
-
- Use Windows File Explorer to movement your awskey.ppk file to your Downloads folder, or provide a path to the binder your.ppk file is located in.
- At the Windows command prompt, navigate to your Downloads folder using the change directory (cd) command:
C:\Users\current_user>cd Downloads and press Enter
-
- At the command prompt, blazon the PSCP command, which includes your .ppk filename (and path if necessary), the name of the file you lot desire to transfer, the "Public DNS" of your EC2 instance, and the path to a folder in your instance:
C:\> pscp -i awskey.ppk S1A_EW_GRD.zip ubuntu@ec2-52-89-147-172.us-east2.compute.amazonaws.com:/home/ubuntu/
Command syntax (brackets indicate optional paths to your .ppk file and the file you want to move if they are not in the binder you are in):
C:\> pscp -i C:\<path>\yourkey.ppk C:\<path>\yourfilename ubuntu@public_DNS:/habitation/ubuntu
Copy a File Out of Your EC2 Instance
At the Windows command prompt type:
C:\> pscp -i yourkey.ppk ubuntu@publicDNS:/home/ubuntu/yourfilename C:\[local_destination_path]\[binder]
Annotation that the .ppk file must be in the folder you lot run the command from, or you must include the path to the file in your PSCP command.
If you don't include a local destination path and folder in the command, the file will download into the folder the command is run from. In this case, the command syntax would be:
C:\> pscp -i C:\[path]\yourkey.ppk ubuntu@publicDNS:/home/ubuntu/[binder]/filename
Example: Move a product generated from an application out of your EC2 instance Product directory to the Data folder on your Windows computer.
-
- Use Windows File Explorer to movement a re-create of my awskey.ppk file to your "Data" folder, or provide a path to the folder your.ppk file is located in.
- At the Windows command prompt, navigate to your "Data" folder using the change directory (cd) command:
C:\> cd Data and press ENTER
-
- At the command prompt, blazon the PSCP control, which includes your .ppk filename, the Public DNS of your EC2 case, and the name of the file y'all want to transfer.
C:\> pscp -i awskey.ppk ubuntu@ec2-52-89-147-172.us-east2.compute.amazonaws.com:/home/ubuntu/Production/F2_unw_phase.tif C:\data_files
Control syntax (brackets point optional paths to your .ppk file and the file you want to move if they are not in the binder you are in):
C:\> pscp -i C:\[path]\yourkey.ppk ubuntu@public_DNS:/home/ubuntu/[path]/yourfilename C:\[local_destination_path]
Of import: Files must exist transferred from your EC2 instance to your computer before you finish the case!
Source: https://asf.alaska.edu/how-to/data-recipes/moving-files-into-and-out-of-an-aws-ec2-instance-windows/
Post a Comment for "How Do I Upload Files Using Putty"