This message was deleted.
# k3os
a
This message was deleted.
h
this sounds correct to me
c
How can I ssh remotely to a k3os instance?
h
have a valid public key in the
ssh_authorized_keys: []
array and/or set a password via
k3os.password
(yaml
k3os: {password: "", ...}
c
so it would be easier to set a password at the command line
h
if you didnt do that when you provisioned it, you can hit
e
in the grub menu and add
k3os.password=mypassword
on the kernel command line as a one-time override (the password will be forgotten next boot, so update your config)
"easier" is up to you to decide. long term, i think supplying ssh public keys in the config is more secure.
c
how do i get to supply public ssh keys. these machines are physical, not virtual
h
how are you getting the config to them?
config.yaml
i mean?
c
thats why im posting here for help!
all i know is what i saw when i went to do a installation to a physical machine and filling in all the blanks
h
i see. well, what i tend to do with homelab boxes is: • boot to "live" mode via installation media while supplying a
k3os.password
value on the kernel command-line •
ssh rancher@<host>
using said password to verify connectivity • copy over the
config.yaml
via the ssh connectivity. for me this is usually
scp
assuming you lack such access, you can also have your
config,yaml
on a usb drive to mount and manually copy onto the system to be used during installation
otherwise you'll want to host it on the local network somewhere
c
can i also set a file to bring in via github??
h
i don't believe so. the config.yaml is a one-shot at install time iirc
the k3os installer accepts config destined for
/k3os/system/config.yaml
(on a booted system) but this can be edited and/or supplemented after the install completes but prior to reboot if you know where to look. see https://github.com/rancher/k3os#configuration, specifically the latter two items in that list
the trick is, on the device that you've installed k3os on, you will need to mount it and create the location and add the config to be merged, knowing that all persistent data on the K3OS_DATA device lives under
/k3os/data
, i.e. •
sudo mkdir -vp /mnt
sudo mount /dev/sda1 /mnt
sudo mkdir -vp /mnt/k3os/data/var/lib/rancher/k3os/config.d
sudo cp my-custom-config.yaml /mnt/k3os/data/var/lib/rancher/k3os/config.d/