I’ve set up an Rancher instance and planning to set up to k8s hosts. The problem is when they spin up, they have their own ssh keys that I don’t have therefore can’t access the instance. I know when the instance finishes setting up I can download the configurations and find the ssh key there, but in situation when the host fails to spin up or while it’s spinning up, I have no way of ssh-ing into it. Is there a workaround for this?
in rancer when you click on the instance, you can download the config. (zip file)
in the zip file is the key rancher used.
Somehwere in 1.2-preX releases you can download the machine config earlier. But generally if a VM fails to create docker-machine will remove it automatically.
This worked like a charm. From the Infrastructure - Hosts menu, select the node (to which you want to ssh) and select Machine Config. This will download the entire machine config (as a zip) file to your local machine.
Unzip the file and copy the id_rsa file to some work directory - say $HOME/temp
$ssh-add $HOME/temp/id_rsa Adds the private key to ur keyset
Once done… you should be able to ssh using
ssh root@