diff options
| author | Paul Bütow <pbuetow@mimecast.com> | 2020-02-11 13:10:26 +0000 |
|---|---|---|
| committer | Paul Bütow <pbuetow@mimecast.com> | 2020-02-11 13:10:26 +0000 |
| commit | ecf7c86bc2f64068e6256ac1b9738c712a9858e9 (patch) | |
| tree | 1ed536ad81a3c87c21eebd1438792ee91ce969e0 /internal/ssh/client/customkeycallback.go | |
| parent | 410ca88465f065f244f88c1d4089cb0fa4a45799 (diff) | |
more on scheduled jobs and ssh callbacks
Diffstat (limited to 'internal/ssh/client/customkeycallback.go')
| -rw-r--r-- | internal/ssh/client/customkeycallback.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/ssh/client/customkeycallback.go b/internal/ssh/client/customkeycallback.go new file mode 100644 index 0000000..73e5289 --- /dev/null +++ b/internal/ssh/client/customkeycallback.go @@ -0,0 +1,24 @@ +package client + +import ( + "net" + + "golang.org/x/crypto/ssh" +) + +// CustomCallback is a custom host key callback wrapper. +type CustomCallback struct { +} + +// NewCustomCallback returns a new wrapper. +func NewCustomCallback() (*CustomCallback, error) { + h := CustomCallback{} + return &h, nil +} + +// Wrap the host key callback. +func (h *CustomCallback) Wrap() ssh.HostKeyCallback { + return func(server string, remote net.Addr, key ssh.PublicKey) error { + return nil + } +} |
