Unable to connect with SSH CA user cert #727
-
Subject of the issueI use step ssh, I generated a client key pair signed with my CA and when I try to connect to my SSH Server it asks me for a password Your environment
Steps to reproduce
Expected behaviourIt should connect me directly Actual behaviourIt asks me for a password Additional contextSSH Host key signing works fine
Thanks ! ;) |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi @ebanDev, could you please post the log from running SSH with the highest verbosity (-vvv)? Also, are you trying to SSH to <principal_on_user_certificate>@<hostname_as_principal_on_host_certificate>? I've found some issues in the past if you don't follow this convention. Edit: Clarified and corrected which principals to use. |
Beta Was this translation helpful? Give feedback.
-
Here is the complete log ! ;) |
Beta Was this translation helpful? Give feedback.
-
What is the principal ? 🤔 |
Beta Was this translation helpful? Give feedback.
-
Oops, misspoke on that one; please see my corrections to that comment. You can see the principal listed when running the On the host side, you'll want to specify its hostname or IP address as the principal on its SSH host certificate. OpenSSH will check this value against your SSH call. My colleague @tashian does a great job explaining a bunch of these intricacies in a discussion I opened up while at my previous job. I'd encourage you to read through my struggle-bussing there 😃 : #527 |
Beta Was this translation helpful? Give feedback.
-
Okay, it works ! 🥳 I changed the principal for the username and it works ! 🥳 Thank you so much ! |
Beta Was this translation helpful? Give feedback.
-
Glad to hear it! |
Beta Was this translation helpful? Give feedback.
Oops, misspoke on that one; please see my corrections to that comment. You can see the principal listed when running the
step ssh certificate inspect ...
command as you did above. In this context, the principal on the user certificate would be the name of the user you are trying to log in as on the host device. For example, if you were to SSH in to theubuntu
user, you would specify it as the principal when provisioning your user certificate:step ssh certificate <key_id> <key_file> --principal="ubuntu"
.On the host side, you'll want to specify its hostname or IP address as the principal on its SSH host certificate. OpenSSH will check this value against your SSH call.
My colleague @tashian …