summaryrefslogtreecommitdiff
path: root/internal/ssh/client/customkeycallback.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ssh/client/customkeycallback.go')
-rw-r--r--internal/ssh/client/customkeycallback.go24
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
+ }
+}