I am working on a clients project and they have Magento installed on their EC2 instance, in order to ssh
into it I need to have the pem file that was generated at the time of setting the key-pair. However I am not able to receive the pem file from their end and I am instead looking for a way to download the existing one. Is it even possible? Or do I create a new key-pair.
2
Answers
No, you can’t download existing key. In order to connect to the server via ssh, you need the key which is generated at the time of server development. You can ask your clients for the key.
I wrote an article about Alibaba SSH Keypairs. If the keypair has been lost, you can replace it if you have Alibaba Cloud credentials (AccessKey and AccessKeySecret). This link to my article goes into specific details.
Alibaba Cloud SSH & ECS KeyPairs
The following commands require that the Alibaba Command Line CLI (aliyuncli) is installed and setup. I would backup (snapshot) the system before making the following changes.
This command will create a new Keypair called “NewKeyPair”
This command will replace the current keypair with NewKeyPair (Windows syntax).