From 81a0eb43d16964707798bde375b38867bb4c2ccf Mon Sep 17 00:00:00 2001 From: "florian.metzger-noel" Date: Thu, 2 May 2024 09:10:43 +0200 Subject: [PATCH] feat: defined valid HostKeyAlgorithms for ssh auth --- plumbing/transport/ssh/auth_method.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plumbing/transport/ssh/auth_method.go b/plumbing/transport/ssh/auth_method.go index ac4e3583c..2f01d1373 100644 --- a/plumbing/transport/ssh/auth_method.go +++ b/plumbing/transport/ssh/auth_method.go @@ -81,6 +81,10 @@ func (a *Password) ClientConfig() (*ssh.ClientConfig, error) { return a.SetHostKeyCallback(&ssh.ClientConfig{ User: a.User, Auth: []ssh.AuthMethod{ssh.Password(a.Password)}, + HostKeyAlgorithms: []string{ + ssh.KeyAlgoRSASHA256, + ssh.KeyAlgoRSASHA512, + }, }) }