# RancherOS on VirtualBox5 access denied

**URL:** <https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524>\
**Category:** RancherOS\
**Created:** [September 22, 2015, 8:55am UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524 "2015-09-22T08:55:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![plegoff](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@plegoff](https://forums.suse.com/u/plegoff)\
**Post date:** [September 22, 2015, 8:55am UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524/1 "2015-09-22T08:55:32Z")

</div>

Hi,

I’m a new on the Forum.  
I’m trying to install RancherOS (v0.4.0-rc6) on VirtualBox 5, using a Vmdk disk + iso.  
After few trials, I was able to install RancherOS, reboot was OK, but the server doesn’t accept my key, and with account rancher/rancher, the ssh access is denied.

what is the format for ssh keys ? ssh2-rsa 2048 ? 1024  
Does I forgot something ? My config.yml contains the correct key

ssh\_authorized\_keys:  
-ssh-rsa AAAAB3N…0mpar rancher@rancher

Some help or explanations would be greatly appreciated.  
rgds,  
Philippe

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 22, 2015, 4:33pm UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524/2 "2015-09-22T16:33:39Z")

</div>

Did you make sure to put in white spacing into the yaml file before the `-`?

```auto
ssh_authorized_keys:
  - ssh-rsa AAAA user@computer

```

When logging in, did you make sure to ssh in using the `rancher` user?

---

<div class="post-metadata">

**Author:** ![plegoff](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@plegoff](https://forums.suse.com/u/plegoff)\
**Post date:** [September 23, 2015, 12:07pm UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524/3 "2015-09-23T12:07:22Z")

</div>

Thanks denise for your reply.  
I correct the white spacing and restart from a new fresh VM :

- Connected with rancher / rancher using the ISO : OK
- Putting my ssh key in .ssh/authorized\_keys file : OK
- Test my ssh connectivity after a logout : OK with my private key
- Within the yml :  
I put a white space beetween the - and ssh-rsa inside ssh\_authorize\_keys section  
I delete also the write file sections I have (just same as the rancherOS tutorial)
- Copy my yml file to /var/lib/rancher/conf/cloud-config.yml
- Check -l /dev/disk/by-label to be sure I don’t have multi label disks
- Launch :

[rancher@rancher ~]$ sudo rancheros-install -c cloud-config.yml -d /dev/sda -t generic  
All data will be wiped from this device  
Partition: true  
DEVICE: /dev/sda  
Are you sure you want to continue? [yN]yUnable to find image ‘rancher/os:v0.4.0-rc6’ locally  
v0.4.0-rc6: Pulling from rancher/os

2c49f83e0b13: Pull complete  
4a5e6db8c069: Pull complete  
…

- cp /dist/vmlinuz /mnt/new\_img/boot/vmlinuz-v0.4.0-rc6-rancheros
- umount /mnt/new\_img  
RancherOS has been installed. Please reboot…

- After reboot (ok) , I try to connect to the VM (NAT/ port forwarding) and now it’s OK…😄

_What a single space could occurs… or not._

Thanks,

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 23, 2015, 1:08pm UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524/4 "2015-09-23T13:08:51Z")

</div>

Yes, yaml formatting is very particular. 🙂

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 23, 2015, 1:08pm UTC](https://forums.suse.com/t/rancheros-on-virtualbox5-access-denied/524/5 "2015-09-23T13:08:55Z")

</div>

Closed on September 23, 2015, 1:08pm UTC


