CloseSSH closes all open ssh client connections
()
| 163 | |
| 164 | // CloseSSH closes all open ssh client connections |
| 165 | func (sh *Shell) CloseSSH() { |
| 166 | sh.SSHActive = "" |
| 167 | for _, cl := range sh.SSHClients { |
| 168 | cl.Close() |
| 169 | } |
| 170 | sh.SSHClients = make(map[string]*sshclient.Client) |
| 171 | } |
| 172 | |
| 173 | // ActiveSSH returns the active ssh client |
| 174 | func (sh *Shell) ActiveSSH() *sshclient.Client { |