# rancherOS Setup: Initial public keyfile

**URL:** <https://forums.suse.com/t/rancheros-setup-initial-public-keyfile/12240>\
**Category:** RancherOS\
**Created:** [November 3, 2018, 9:49pm UTC](https://forums.suse.com/t/rancheros-setup-initial-public-keyfile/12240 "2018-11-03T21:49:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tech4701283](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tech4701283](https://forums.suse.com/u/tech4701283)\
**Post date:** [November 3, 2018, 9:49pm UTC](https://forums.suse.com/t/rancheros-setup-initial-public-keyfile/12240/1 "2018-11-03T21:49:47Z")

</div>

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**

> **[OpenStack Security Tip: Create a keypair for accessing VMs](https://www.mirantis.com/blog/openstack-security-tip-create-a-keypair-for-accessing-vms/)**
>
> Bolster security on your OpenStack cloud by using the OpenStack Dashboard, Horizon, to set up public/private key pairs to properly protect the instance.

**My cloud-config.yaml:**

```auto
#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 🙂

---

<div class="post-metadata">

**Author:** ![Cyber](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@Cyber](https://forums.suse.com/u/Cyber)\
**Post date:** [November 7, 2018, 4:47pm UTC](https://forums.suse.com/t/rancheros-setup-initial-public-keyfile/12240/2 "2018-11-07T16:47:16Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Cyber](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@Cyber](https://forums.suse.com/u/Cyber)\
**Post date:** [November 7, 2018, 5:49pm UTC](https://forums.suse.com/t/rancheros-setup-initial-public-keyfile/12240/3 "2018-11-07T17:49:36Z")

</div>

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.
