Can't download AWS SSH Keypair

I am using Rancher with EKS on AWS. I successfully deploy a cluster but I can’t figure out how to download the keypair so I can manually SSH into my nodes. I read that I should be able to do this by going to the nodes section, clicking the 3 dots button and pressing download keys, but I don’t see those options. When I got to AWS, I can see my ec2 instances have pem files associated with them, but I can’t see anywhere I can access them.

Thanks!

1 Like

I face exactly the same problem here, and there does not seem to be documentation on it either.

The action to download keys is for clusters where we’ve created the VMs with docker-machine, which generates a unique key per node. Those nodes are then used to create a RKE cluster out of them.

For EKS you select an existing (public) SSH key for Amazon to put on the nodes when defining the cluster. We don’t have or know the private key that correspond to that public key.

Thanks Vincent.

However I was using eks_config from terraform rancher provider to provision my EKS cluster and it states that key_pair_name was optional (https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster#key_pair_name) so I did not give it an existing key leading to Rancher creating a new EC2 key pair and assigning it to EKS worker nodes that Rancher created. I looked around and seems there is no way to retrieve that Rancher created key pair anymore now.

It’s all CloudFormation so you could poke around and maybe it’s somewhere there, but I don’t think we persist a copy of it for that case. (@luther?)