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
ssh: unable to ignore host key auth callback #654
Comments
aymanbagabas
added a commit
to aymanbagabas/go-git
that referenced
this issue
Jan 9, 2023
Don't overwrite HostKeyCallback if one is provided. Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411") Fixes: go-git#654 Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Argo CD also relies on the |
aymanbagabas
added a commit
to aymanbagabas/go-git
that referenced
this issue
Mar 5, 2023
Don't overwrite HostKeyCallback if one is provided. Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411") Fixes: go-git#654 Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
durandj
pushed a commit
to durandj/go-git
that referenced
this issue
Jul 1, 2023
Don't overwrite HostKeyCallback if one is provided. Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411") Fixes: go-git#654 Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
The changes introduced in c35b808 breaks the ability to ignore the client host key check. In our case, we're using
ssh.InsecureIgnoreHostKey()
for integration testing where we don't care about validating the host key. The changes made in the commit deprecate theHostKeyCallbackHelper
interface and don't provide any workaround.Implementing a
ssh.AuthMethod
with a customHostKeyCallback
won't work either since the associatedssh.ClientConfig
will be overwritten byssh.SetConfigHostKeyFields()
when establishing the connection.Before these changes were introduced, you could pass a
HostKeyCallbackHelper
to any ssh AuthMethod and it will set theHostKeyCallback
function to be used to validate the host key.I tried wrapping the
PublicKeys
AuthMethod and modifying theHostKeyCallback
, but it gets overwritten before the connection happens.Related: #411
Related: #431
The text was updated successfully, but these errors were encountered: