-
i understand that in order for cert based auth to work the user needs to exist on the target host - are there any recommendations with regards to new user creation when using cert based auth for ssh? i've tried unsuccessfully to use pam_exec.so to trigger a shell script to create the user - any other thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @chomezski: The open-source implementation provides a "rudimentary" way to create new users on the fly. Although it works this is not "supported" and the documentation for it was removed The way it works is that when you create a new certificate you can create at the same time a provisioner certificate that contains a For example, if I run $ step ssh certificate -f --add-user [email protected] jane
✔ Provisioner: [email protected] (JWK) [kid: xxx]
✔ Please enter the password to decrypt the provisioner key:
✔ CA: https://localhost:9000
Please enter the password to encrypt the private key:
✔ Private Key: jane
✔ Public Key: jane.pub
✔ Certificate: jane-cert.pub
✔ SSH Agent: yes
✔ Add User Private Key: jane-provisioner
✔ Add User Public Key: jane-provisioner.pub
✔ Add User Certificate: jane-provisioner-cert.pub An extra certificate has been created
If this certificate is used, it will run as the user
There, the There's a small guide on how to set up this in the deleted code of this change smallstep/cli@5a8c655 Improved support this is available in our SaaS offering, that you can sign up and use for free within some limits https://smallstep.com |
Beta Was this translation helpful? Give feedback.
Hi @chomezski: The open-source implementation provides a "rudimentary" way to create new users on the fly. Although it works this is not "supported" and the documentation for it was removed
The way it works is that when you create a new certificate you can create at the same time a provisioner certificate that contains a
useradd
command, although this is configurable.For example, if I run
step ssh certificate
with the--add-user
flag: