work/ssh.go

20 lines
374 B
Go

package main
import (
"log"
"golang.org/x/crypto/ssh"
)
type SSHConnection struct {
client *ssh.Client
// session *ssh.Session // Session wird für Forwarding nicht direkt benötigt
}
func (s *SSHConnection) Close() error {
if s.client != nil {
log.Println("DEBUG: Closing SSH client connection.") // Optional Debug Log
return s.client.Close()
}
return nil
}