Accessing an instance with PuTTY¶
OpenSSH client for Windows is installed by default since Windows 10. We recommend using SSH instead of PuTTy.
Prerequisite¶
Convert the private key to PuTTY format¶
You will need to use PuTTYgen to convert your private key into PuTTY format:
Please refer to this page
Please refer to this page
- Run PuTTYgen. A window opens where you can configure your key-generation settings.
- Click Generate and follow the on-screen instructions to generate a new key. For most cases, the default parameters are fine, but you must generate keys with at least 2048 bits. When you are done generating the key, the tool displays your public key value.
- In the Key comment section, replace the existing text with the username of the user for whom you will apply the key.
- Optionally, you can enter a Key passphrase to protect your key.
- Click Save private key to write your private key to a file with a
.ppk
extension. - Click Save public key to write your public key to a file for later use. Keep the PuTTYgen window open for now.
Please refer to this page
Import SSH Key pair to your instances¶
There is nothing to do on AWS: using the built-in tools to create a key pair will automatically generate a public key on the EC2 platform.
There is nothing to do on Alibaba: using the built-in tools to create a key pair will automatically generate a public key on the EC2 platform.
From the open PuTTYgen window, you will need to copy the content of the generated public key:
Paste the content to create a new key pair .
You need to import the SSH public key when creating a new virtual machine.
From the open PuTTYgen window, copy the content of the generated public key:
Paste it in the SSH public key field.
Please refer to this page
Connect to the instance¶
In the Category pane, choose Session and complete the following fields:
-
In the Host Name box, enter
shell@{instance_ip}
where {instance_ip} is your instance public IP: -
Under Connection type, select SSH
- Ensure that Port is 22
-
In the Category pane, expand Connection, expand SSH, and then choose Auth:
-
Click Browse
- Select the
.ppk
file that you generated for your key pair with PuTTYgen - (Optional) If you plan to start this session again later, you can save the session information for future use. Choose Session in the Category tree, enter a name for the session in Saved Sessions, and then choose Save
- Click Open to start the PuTTY session. If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box that asks whether you trust the host you are connecting to.
- Click Yes. A window opens and you are connected to your instance.