Skip to content

Commit

Permalink
Fix wrong method for expanding known hosts file path
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
  • Loading branch information
kke committed Feb 14, 2024
1 parent 2a62a23 commit 826be69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func (c *Connection) hostkeyCallback() (ssh.HostKeyCallback, error) {
}

c.Log().Tracef("using default known_hosts file %s", hostkey.DefaultKnownHostsPath)
defaultPath, err := homedir.ExpandFile(hostkey.DefaultKnownHostsPath)
defaultPath, err := homedir.Expand(hostkey.DefaultKnownHostsPath)
if err != nil {
return nil, fmt.Errorf("expand known_hosts file path: %w", err)
}
Expand Down

0 comments on commit 826be69

Please sign in to comment.