I have an SSH key pair. How can I add my public ke...
# harvester
s
I have an SSH key pair. How can I add my public key to the authorized_keys file on a Harvester node to make it persistent for user rancher? Thanks.
t
SSH in as the Rancher user and added it there. You may have to create the.SSH authorized keys file but then you can pseudo if you need root.
s
I did that "add public key to .ssh/authorized_keys" but it gets overwritten on reboot.
t
Never reboot, lol. Check./oem directory. Should probably go into the harvester config Yaml there.
b
There's a few ways. • Put it in the config at install or have the installer add it during the appropriate screeen • You can add it to the
/oem/90_custom.yaml
• You can
ssh-copy-id <host>
👍 1
If the keys aren't persisting through reboots, you might need to alter your config allow that path to persist.
m
for reference, here's the relevant doc to install config: https://docs.harvesterhci.io/v1.4/install/harvester-configuration#osssh_authorized_keys