diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-05 10:00:38 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-05 10:00:38 +0300 |
| commit | f70622f307629a2542ea5eb128dea8c1043d3a40 (patch) | |
| tree | 82455dac0c870b28aea8c96a426050dc215a8818 /internal/clients/connectors/serverconnection.go | |
| parent | 599075bc6580ba77dc22ba1c1ec8aa908ef2462d (diff) | |
more on this
Diffstat (limited to 'internal/clients/connectors/serverconnection.go')
| -rw-r--r-- | internal/clients/connectors/serverconnection.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/internal/clients/connectors/serverconnection.go b/internal/clients/connectors/serverconnection.go index 5bc63ee..1666a79 100644 --- a/internal/clients/connectors/serverconnection.go +++ b/internal/clients/connectors/serverconnection.go @@ -23,7 +23,6 @@ type ServerConnection struct { config *ssh.ClientConfig handler handlers.Handler commands []string - isOneOff bool hostKeyCallback client.HostKeyCallback throttlingDone bool } @@ -49,24 +48,6 @@ func NewServerConnection(server string, userName string, authMethods []ssh.AuthM return &c } -// NewOneOffServerConnection creates new one-off connection (only for sending a series of commands and then quit). -func NewOneOffServerConnection(server string, userName string, authMethods []ssh.AuthMethod, handler handlers.Handler, commands []string) *ServerConnection { - c := ServerConnection{ - server: server, - handler: handler, - commands: commands, - config: &ssh.ClientConfig{ - User: userName, - Auth: authMethods, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - }, - isOneOff: true, - } - - c.initServerPort() - return &c -} - func (c *ServerConnection) Server() string { return c.server } |
