How to use putty to connect an Amazon EC2 instance?
PuTTY is a terminal emulator, serial console, and network file transfer tool that is free and open-source. SCP, SSH, Telnet, rlogin, and raw socket connections are among the network protocols it supports. It also has the ability to connect to a serial port.
- Verify that the instance is up and running.
To begin, ensure that your EC2 instance is ready. It may take a few minutes for an instance to be ready for you to connect to after it has been launched. Check to see if your instance’s status checks were successful. On the Instances page, you can see this in the Status check column.
- Putty should be installed on the local computer.
- Go to the PuTTY download website and download and install PuTTY.
- Then, to install the software, select the “click to install” option.
- The installer then asks for the destination folder where the software will be installed. The default setting is the best option. Simply click the next button.
- When the installation is complete, it should display a success message.
- To leave the installer, click Finish.
- Use PuTTYgen to convert your private key.
- Find the private key (.pem file) for the key pair you specified when the instance was launched.
- Then, in order to utilize PuTTY, convert the.pem file to a.ppk file.
- PuTTY comes with a utility called PuTTYgen that converts keys to the PuTTY format.
- Please follow the procedures below to convert your private key:
- Select All Programs—>PuTTY—>PuTTYgen from the Start menu.
- Select RSA from the Type of Key to generate a drop-down menu. Choose SSH-2 RSA if your version of PuTTYgen does not have this option.
- Then select Load. PuTTYgen only shows files with the.ppk extension. Choose the option to see files of all types to find your.pem file.
- Then, make a list of all file kinds.
- Next, choose Open and choose the.pem file for the key pair you selected when you launched your instance. The.pem file was successfully imported, according to PuTTYgen. Select OK.
- Choose Save private key to save the key in a format that PuTTY understands. PuTTYgen warns you not to save the key without a passphrase. Select Yes.
- Finally, choose Save and enter the same name for the key as you did for the key pair. The.ppk file extension is automatically added by PuTTY.
- Your private key has been converted to the PuTTY-compatible format. You can now use PuTTY’s SSH client to connect to your instance.
- Log in to your Linux server.
- Choose All Programs—>PuTTY from the Start menu.
- Select Session from the Category drop-down menu and fill in the fields below:
- Try one of the following in the Host Name box:
- (Domain Name System) Enter my-instance-user-name@my-instance-public-dns-name to connect using your instance’s public DNS name.
- (IPv6) Alternatively, if your instance has an IPv6 address, use my-instance-user-name@my-instance-IPv6-address to connect using your instance’s IPv6 address.
- Make sure the Port value is set to 22.
- Finally, pick SSH as the connection type.
- To keep the session active, you can configure PuTTY to send ‘keepalive’ data at regular intervals. Choose Connection from the Category drop-down menu, then enter the desired interval in the seconds between keepalive areas.
- Expand Connection—>expand SSH, and then pick auth in the Category pane. Complete the following questions: Select Browse. Choose the.ppk file that you created for your key pair and click OK.
- PuTTY displays a security alert dialogue box when connecting for the first time, asking if you trust the host to which you’re connecting. Select Yes. You’ll see a window pop up, and you’ll be linked to your instance.
At Velan, our server support engineers can help your AWS EC2 Linux servers. If you are interested in our