Ok, i watched the demo and learned that i need to use the provisioning snippet 'create_users' for this.
After provisioning, my public key is on the new host but i have issues with the format of the key in autorized_keys file.
I copied my public key into Foreman as following:
[key type] [key] [comment]
ssh-rsa AAA...== Dimitrij Artes
In the authorized_keys file i see the following:
[key type] [key type] [key] [comment] [comment]
ssh-rsa ssh-rsa AAA...== Dimitrij Artes [username]@[foreman fqdn]
If i copy my key to Foreman without key type i get the error 'Fingerprint could not be generated Length could not be calculated'.
If i let the comment blank i get
ssh-rsa ssh-rsa AAA...== [username]@[foreman fqdn]
The biggest problem is the double key type wich caused failure in the structure of the key in authorized_keys file.
How should i paste my key in Foreman?