rancherOS Setup: Initial public keyfile


#1

Hi there,

does anyone know which ssh public key file rancherOS is setting if no keyfile is provided on setup from external sources?

Or does a rancher setup fail in general if no setup key file is provided?

Reason: Can’t access rancherOS Instance that is deployt via a “Mirantis Open Stack Dashboard” (Error: wrong keyfile) altough I inject the key via cloud-config.yaml and also via the builtin Dashboard Key Handling:

Mirantis docs --> key pair installation:

Create a key pair in Horizon

My cloud-config.yaml:

#cloud-config
ssh_authorized_keys:
  - ssh-rsa AAA...ZZZ master1@rancher

Is it possible that rancherOS does not receive a key file and is using a initial one?
Mirantis Dashboard Logs showing that the setup was successful and I the server accepts incoming ssh connection, except the correctly passed keyfile…

Thanks a lot :slight_smile:


#2

Hi,

i actually setup the VERSION=v1.4.2 . My Cloud-Config looked like:

#cloud-config
ssh_authorized_keys:
- ssh-rsa AA...==

This works fine for me. The documentation said
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAA…ZZZ example1@rancher
I wasnt sure about the “example1@rancher” because the default login user is rancher@rancher, atleast for me so i left it blank and it works fine (I am a noob when it comes to cloud-config, so i thought the key have to match with the user)


#3

You said you are using

cloud-config.yaml

The documentation tells us to use

cloud-config.yml

$ sudo ros install -c cloud-config.yml -d /dev/sda

Maybe the tool is expecting the right file name and wont work with another. You should give it a try.