-
Notifications
You must be signed in to change notification settings - Fork 602
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
Usage of @cert-authority in known host files #281
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have set up a known hosts file that contains a @cert-authority entry and am unable to use it to connect to an ssh server that uses a HostCertificate signed by that CA. I have not found an example or test that work with such a known hosts file. Is this currently possible at all and can an example be added?
Details on my scenario
When I load the known hosts file via
The host key is not accepted with the exception
From what I understood sshj can read a known_hosts file that contains a line starting with a @cert-authority-marker but then would compare the lines CA public key with the server's non-matching public key in
OpenSSHKnownHosts.AbstractEntry.verify(PublicKey key)
.Adding my own HostKeyVerifier gives me the hostname, port and an java.security.PublicKey but not the CA cert I need to implement a custom validation.
content of ~/.ssh/known_hosts:
The ssh server I used is an Ubuntu Xenial machine with the following setup:
/etc/ssh/sshd_config (HostKey and HostCertificate are at the bottom):
Using "ssh root@localhost -p 2222 -v" on linux is able to read my known_hosts entry and can connect without asking for verification:
The text was updated successfully, but these errors were encountered: