Skip to content

Commit 67652f4

Browse files
authored
✨ Stop populating known_hosts (#65)
Signed-off-by: Jason Montleon <[email protected]>
1 parent 3153a61 commit 67652f4

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

ssh/ssh.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,31 +101,6 @@ func (r *Agent) Add(id *api.Identity, host string) (err error) {
101101
if err != nil {
102102
return
103103
}
104-
cmd = command.New("/usr/bin/ssh-keyscan")
105-
cmd.Options.Add(host)
106-
err = cmd.Run()
107-
if err != nil {
108-
return
109-
}
110-
known := "/etc/ssh/ssh_known_hosts"
111-
f, err = os.OpenFile(
112-
known, os.O_RDWR|os.O_APPEND|os.O_CREATE,
113-
0600)
114-
if err != nil {
115-
err = liberr.Wrap(
116-
err,
117-
"path",
118-
path)
119-
return
120-
}
121-
_, err = f.Write(cmd.Output())
122-
if err != nil {
123-
err = liberr.Wrap(
124-
err,
125-
"path",
126-
path)
127-
}
128-
_ = f.Close()
129104
addon.Activity("[FILE] Created %s.", path)
130105
return
131106
}

0 commit comments

Comments
 (0)