skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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”

    aliyuncli ecs CreateKeyPair --RegionId us-west-1 --KeyPairName NewKeyPair
    

    This command will replace the current keypair with NewKeyPair (Windows syntax).

    aliyuncli ecs AttachKeyPair --InstanceIds "["i-abcdeftvgllm854abcde"]" --KeyPairName NewKeyPair
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search