Connecting to your ec2 Linux instance from Windows using PuTTY #103
akash-coded
started this conversation in
Guidelines
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After you launch your instance, you can connect to it and use it the way that you'd use a computer sitting in front of you.
The following instructions explain how to connect to your instance using PuTTY, a free SSH client for Windows.
Prerequisites
Before you connect to your Linux instance using PuTTY, complete the following prerequisites.
Verify that the instance is ready
After you launch an instance, it can take a few minutes for the instance to be ready so that you can connect to it. Check that your instance has passed its status checks. You can view this information in the Status check column on the Instances page.
Verify the general prerequisites for connecting to your instance
To find the public DNS name or IP address of your instance and the user name that you should use to connect to your instance, see General prerequisites for connecting to your instance.
Install PuTTY on your local computer
Download and install PuTTY from the PuTTY download page. If you already have an older version of PuTTY installed, we recommend that you download the latest version. Be sure to install the entire suite.
Convert your private .pem key to .ppk using PuTTYgen
For the key pair that you specified when you launched the instance, if you chose to create the private key in the .pem format, you must convert it to a .ppk file for use with PuTTY. Locate the private .pem file, and then follow the steps in the next section.
Steps
Convert your private key using PuTTYgen
PuTTY does not natively support the PEM format for SSH keys. PuTTY provides a tool named PuTTYgen, which converts PEM keys to the required PPK format for PuTTY. You must convert your private key (.pem file) into this format (.ppk file) as follows in order to connect to your instance using PuTTY.
To convert your private .pem key to .ppk
Note
A passphrase on a private key is an extra layer of protection. Even if your private key is discovered, it can't be used without the passphrase. The downside to using a passphrase is that it makes automation harder because human intervention is needed to log on to an instance, or to copy files to an instance.
Specify the same name for the key that you used for the key pair (for example, my-key-pair) and choose Save. PuTTY automatically adds the .ppk file extension.
Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY's SSH client.
Connect to your Linux instance
Use the following procedure to connect to your Linux instance using PuTTY. You need the .ppk file that you created for your private key. For more information, see Convert your private key using PuTTY in the preceding section.
To connect to your instance using PuTTY
Transfer files to your Linux instance using the PuTTY Secure Copy client
The PuTTY Secure Copy client (PSCP) is a command-line tool that you can use to transfer files between your Windows computer and your Linux instance. If you prefer a graphical user interface (GUI), you can use an open-source GUI tool named WinSCP.
To use PSCP, you need the private key you generated in Convert your private key using PuTTYgen. You also need the public DNS name of your Linux instance, or the IPv6 address if your instance has one.
The following example transfers the file Sample_file.txt from the C:\ drive on a Windows computer to the my-instance-user-name home directory on an Amazon Linux instance. To transfer a file, use one of the following commands.
(Public DNS) To transfer a file using your instance's public DNS name, enter the following command.
(IPv6) Alternatively, if your instance has an IPv6 address, to transfer a file using your instance's IPv6 address, enter the following command. The IPv6 address must be enclosed in square brackets ([ ]).
Beta Was this translation helpful? Give feedback.
All reactions