-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import_key
variable does not insert public ssh key into ~/.ssh/authorized_keys
#45
Comments
So that variable looks like it might only work on Ubuntu (which is a thing we'll need to call out) but also follows the schema defined here: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#ssh-import-id Are you passing the public ssh key in directly? |
Yes, this needs to be documented more about the format that the value should take, namely conforming to the docs @erindatkinson listed above. |
Can I second what @scarolan has stated above? I took at a look in the root@tfe-vpkqok5r-primary-0:/var/log# cat cloud-init-output.log | grep -i ssh
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
/tmp/ssh-auth-key-check36ddrtk3.pub is not a public key file.
/tmp/ssh-auth-key-checkxpspvjwr.pub is not a public key file.
/tmp/ssh-auth-key-checkk85nj4m6.pub is not a public key file.
/tmp/ssh-auth-key-checkq5onvx6y.pub is not a public key file.
2019-12-09 02:45:19,010 INFO [0] SSH keys [Authorized]
2019-12-09 02:45:19,011 ERROR No matching keys found for [ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAA/gCfGswRr/BzYSsjEv1kCZ4Pdhc/a/OL2zAf3q+ORYnt2CLVxD/61ptbVRFTnHN2+DBdvWifwivRdIivKWUmQuX7vAQx7oEAs6rgAHlBmjhTy6q8sOZHnW2qz7vXyXKsApR5QfNHU/1RC2GnPTEUn2atD1tz6dA9TzCLhEMWiifxfniaXgSEExtyD8pWhQ6CRz6vtQkBGPY5hCwUChJkfzantTbViCLn8ieGAFYRQ8Ch4XbtixKoP8EhjC73mOSYmgJfHUd9vWf/npDtMkaBHIfCX6rnQU4Chy1Vcyy3HW2B3Ivr9G8jym46BsjdBtd0MxOMsCsP4SvkOqHQlVkz [email protected]]
2019-12-09 02:45:19,012 - util.py[WARNING]: Failed to run command to import ubuntu ssh ids
2019-12-09 02:45:19,039 - util.py[WARNING]: ssh-import-id failed for: ubuntu ['ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAA/gCfGswRr/BzYSsjEv1kCZ4Pdhc/a/OL2zAf3q+ORYnt2CLVxD/61ptbVRFTnHN2+DBdvWifwivRdIivKWUmQuX7vAQx7oEAs6rgAHlBmjhTy6q8sOZHnW2qz7vXyXKsApR5QfNHU/1RC2GnPTEUn2atD1tz6dA9TzCLhEMWiifxfniaXgSEExtyD8pWhQ6CRz6vtQkBGPY5hCwUChJkfzantTbViCLn8ieGAFYRQ8Ch4XbtixKoP8EhjC73mOSYmgJfHUd9vWf/npDtMkaBHIfCX6rnQU4Chy1Vcyy3HW2B3Ivr9G8jym46BsjdBtd0MxOMsCsP4SvkOqHQlVkz [email protected]']
2019-12-09 02:45:19,040 - util.py[WARNING]: Running module ssh-import-id (<module 'cloudinit.config.cc_ssh_import_id' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_import_id.py'>) failed |
I configured the module below using a variable to define the import_key input:
But the VMs never get the content of the import_key variable inserted into ~/.ssh/authorized_keys
The text was updated successfully, but these errors were encountered: