Replies: 11 comments 4 replies
-
|
I have the exact same problem. I followed the same blog post and everything works until I try the |
Beta Was this translation helpful? Give feedback.
-
|
I've given up trying this I've created manually a
step ca bootstrap --ca-url=https://srv-ca.my.domain.tld:20000 --fingerprint [Fingerprint of my root certificate]
Add-Content -Path ~\.ssh\known_hosts -Value("@cert-authority * " + (step ssh config --host --roots))
step ssh login my.user@my.domain.tld --provisioner=[my provisioner]
ssh my.user@my.domain.tldStep 3 must be repeated every time the certificate becomes invalidatet! Double check your user name settings. Check the principal your are using. ssh-add -L | step ssh inspectBR SMF |
Beta Was this translation helpful? Give feedback.
-
|
@mf-in-mun Perhaps my configuration is not correct on the OIDC provider? I am using my self-hosted authelia instance instead of google as in the example from the blog. |
Beta Was this translation helpful? Give feedback.
-
|
I'm using a self hosted Zitadel instance. I have no knowledge on Authelia. Be prepard for a steep learning curve. Please do not expect a ready to use copy and paste approach.
step ca provisioner add "[provisioner name" \
--type=oidc \
--ssh \
--client-id="XXXXXXXXXXXXXXXX" \
--client-secret="" \
--configuration-endpoint="https://srv-zitadel.my.domain.tld/.well-known/openid-configuration" \
--listen-address="127.0.0.1:20001" \
--domain="my.domain.tld" \
--domain="domain.tld"Some links I find helpful: BR SMF |
Beta Was this translation helpful? Give feedback.
-
|
Many thanks! Finally, the Now it actually works for me it seems. |
Beta Was this translation helpful? Give feedback.
-
|
Happy to hear it's working. Let's close this issue marking your reply as an answer. BR SMF |
Beta Was this translation helpful? Give feedback.
-
|
The only thing that still does not work is that I need to still verify the authenticity of the host the first time I connect to it. Perhaps that is the cause? |
Beta Was this translation helpful? Give feedback.
-
|
You must ensure that your host provides it's own certificate. I'm not working with the ACME protocoll. I'm using this for some servers without a http-server listening on port 80. So I'm using the step-cli software. Generate a ssh key: rm -f /etc/ssh/ssh_host_ecdsa_key # Remove an old one if existing
/usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' # No PassphraseThen the key must be signed /usr/bin/step ssh certificate $(hostname) /etc/ssh/ssh_host_ecdsa_key.pub --host --sign --not-after="24h02m" --force --password-file="[your password file" --provisioner=[your provisioner]
Next your authorized_keys file must be changed: echo "@cert-authority $(hostname) $(/usr/bin/step ssh config --roots)" > /etc/ssh/authorized_keysCheck your SSH daemon configuration very, very carefully. Again this is some serious stuff. |
Beta Was this translation helpful? Give feedback.
-
|
Happy to hear it's working. For some further checking you can set debug loglevel You will get a lot of information and you will see which key respectively which certficate is used. |
Beta Was this translation helpful? Give feedback.
-
|
Well, you need some sort of trigger to create or renew your certificate(s). Right? For now I'm working with 2 triggers:
And I have decided to renew my certificates (SSL and SSH) every day. Which is the default setting for a step ca provider. This is a pragmatic solution that meets the demand for short-lived certificates on the one hand and the demand for stable operation on the other. I'm using a Systemd service during boot time and a Systemd timer with it's service for renewal. Tuning this to a stable system needs some time. |
Beta Was this translation helpful? Give feedback.
-
|
The idea behind getting a new certificate AND a new key is, to get rid of everything which could be silently compromized. Using systemd or crond is a technical implementation detail. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using smallstep step ca for a couple of months, started with an automated SSL provisioning, set up a Borg Backup remote server with automated SSH certificates provisioning and now I want to move a step further.
I want to change my SSH key handling using step ca and an OIDC provider Zitadel.
I'm working mainly with this blog https://smallstep.com/blog/diy-single-sign-on-for-ssh/
I've setup a new oidc privisioner and running
works.
I've got a SSH certificate, with an entry in the ssh-agent.
ssh-add -Lshows that key,step ssh listshows that exact entry andstep ssh list --raw | step ssh inspectseems to be fine.But when I try that command
for configuration I always got an error
Searching here the only thing I found was a code snippet from the project:
I'm sorry, but that's nothing which helped me.
I've tried this on Win 11, Powershell 7.5.3 and on Fedora 42, ghostty. On both I got that error.
Please, may I ask for some help?
I'm quite sure that I'm missing some configuration.
Hopefully somebody can point me into the right direction.
BR SMF
System: Win 11 24h2, update on Tuesday, Smallstep CLI/0.28.7 installed via winget.
Fedora 42 updated today, Smallstep CLI 0.28.7 installed via the Smallstep repo.
step ca, containerized using Podman, image based on Alpinelinux 3.22.1, running on an Almalinux 10 server
Beta Was this translation helpful? Give feedback.
All reactions