Skip to content

SSH connection not closed properly #16

@aardkronkel

Description

@aardkronkel

SSH connection needs to be closed when done. This is currently not the case.

Perhaps refactor connector.go and execute.go
and replace ssh.Dial convenience function call with something else:

c, err := net.DialTimeout(network, addr, timeout)
if err != nil {
    return nil, err
}
conn, chans, reqs, err := ssh.NewClientConn(c, addr, config)
if err != nil {
    return nil, err
}

// will close the underlying net.Conn
defer conn.Close 

client := ssh.NewClient(c, chans, reqs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions