From ecf7c86bc2f64068e6256ac1b9738c712a9858e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Tue, 11 Feb 2020 13:10:26 +0000 Subject: more on scheduled jobs and ssh callbacks --- internal/ssh/client/customkeycallback.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 internal/ssh/client/customkeycallback.go (limited to 'internal/ssh/client/customkeycallback.go') 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 + } +} -- cgit v1.2.3