Skip to content

Commit

Permalink
✨ Stop populating known_hosts (#65)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
  • Loading branch information
jmontleon authored Oct 10, 2024
1 parent 3153a61 commit 67652f4
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 67652f4

Please sign in to comment.