From 81db4b8159a9edbb5634f47a442409d022094056 Mon Sep 17 00:00:00 2001 From: Jason Montleon Date: Wed, 9 Oct 2024 12:33:25 -0400 Subject: [PATCH] :sparkles: Stop populating known_hosts Signed-off-by: Jason Montleon --- ssh/ssh.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/ssh/ssh.go b/ssh/ssh.go index c317732..570a741 100644 --- a/ssh/ssh.go +++ b/ssh/ssh.go @@ -101,31 +101,6 @@ func (r *Agent) Add(id *api.Identity, host string) (err error) { if err != nil { return } - cmd = command.New("/usr/bin/ssh-keyscan") - cmd.Options.Add(host) - err = cmd.Run() - if err != nil { - return - } - known := "/etc/ssh/ssh_known_hosts" - f, err = os.OpenFile( - known, os.O_RDWR|os.O_APPEND|os.O_CREATE, - 0600) - if err != nil { - err = liberr.Wrap( - err, - "path", - path) - return - } - _, err = f.Write(cmd.Output()) - if err != nil { - err = liberr.Wrap( - err, - "path", - path) - } - _ = f.Close() addon.Activity("[FILE] Created %s.", path) return }