RancherOS on VirtualBox5 access denied

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

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

ssh_authorized_keys:
  - ssh-rsa AAAA  user@computer

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

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…:smile:

What a single space could occurs… or not.

Thanks,

Yes, yaml formatting is very particular. :slight_smile: