blob: 73e5289aaaf5135a32df48dd90fd66112bce47d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
}
}
|