close connection in ssh exec

This commit is contained in:
William Banfield
2022-12-01 11:21:51 -05:00
parent 8ec6013b1d
commit 59f93e9035

View File

@@ -18,6 +18,7 @@ func Exec(cfg *ssh.ClientConfig, addr, cmd string) error {
if err != nil {
return err
}
defer c.Close()
s, err := c.NewSession()
if err != nil {
return err