I created a couple host instances in EC2 using the UI, and I’d like to SSH into them.
Looking at the instances in EC2, each of the hosts were created with their own key pair (named after the host name).
However, I don’t have those keys to ssh into them.
I’m not sure where to find those keys or where/how I can connect to them.
I tried on the host server which is running rancher/server
I tried from the rancher/server container via docker exec
I guess I must be missing something obvious?
Could the UI ask for the key pair name to use when creating instances in AWS, instead of creating a new one each time?
In the UI on the host there is a Machine Config action that will give you the key pair (among other things):
There is not an option in docker-machine to use an existing key pair. You need to provide it the private key somehow because it uses it to SSH to the machine and install Docker after the Instance is created.
That is possible but not implemented; docker-machine would still have already added a keypair and doesn’t clean it up until the host is deleted.
Just FYI unless you are specifically setting a RancherOS AMI ID at the end of the Add Host steps, you are deploying Ubuntu instances (not RancherOS). It’s the default for docker-machine and we haven’t added friendly options to change it (yet).