2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
3
if you are using Linux
ssh -i /path/to/your/pemfile.pem ec2-user@your-ec2-public-dns
if you are using Windows you can use the following command in PowerShell with the OpenSSH client
ssh -i "C:\path\to\your\pemfile.pem" ec2-user@your-ec2-public-dns
Or with putty
you'll first need to convert the .PEM file into a .PPK file To convert the .pem file to .ppk file you need puttygen.exe
- Run PuTTYgen, and click on the "Load" button to import your .PEM file. Make sure to change the file type to "All Files (.)" in the file dialog so that you can see your .PEM file.
- Once the .PEM file is loaded, click on the "Save private key" button to save the private key as a .PPK file. You can choose a name and location for the .PPK file. It's a good idea to store it in a safe location.
Noe Open putty
- enter the public DNS or the public IP address of your EC2 instance in the "Host Name (or IP address)" field.
- In the left-side category pane, navigate to "Connection" > "SSH" > "Auth". In the "Private key file for authentication" section, click the "Browse" button and locate the .PPK file you saved in step 3.
- Go back to the "Session" category in the left-side pane, and you can save your session settings by entering a name in the "Saved Sessions" field and clicking the "Save" button. This way, you won't have to reconfigure the settings every time you want to connect to your EC2 instance.
1
Please check this document.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/openssh.html
Connecting using OpenSSH by specifying .pem in the command.
ssh -i /path/key-pair-name.pem instance-user-name@instance-public-dns-name
Contenus pertinents
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 10 mois