19 lines
269 B
Go
19 lines
269 B
Go
package main
|
|
|
|
import (
|
|
"log/slog"
|
|
|
|
"golang.org/x/crypto/ssh"
|
|
)
|
|
|
|
type SSHConnection struct {
|
|
client *ssh.Client
|
|
}
|
|
|
|
func (s *SSHConnection) Close() error {
|
|
if s.client != nil {
|
|
slog.Debug("Closing SSH client connection.")
|
|
return s.client.Close()
|
|
}
|
|
return nil
|
|
}
|