add HostKeyCallback

master
dingjun 8 years ago
parent 1eaade8434
commit 414fcf3293

@ -154,6 +154,11 @@ func main() {
User: cfg.Username, User: cfg.Username,
Auth: auth, Auth: auth,
Timeout: 10 * time.Second, Timeout: 10 * time.Second,
HostKeyCallback: func(hostname string, remote net.Addr,
key ssh.PublicKey) error {
obfssh.Log(obfssh.INFO, "%s %s %+v", hostname, remote, key)
return nil
},
} }
// parse environment proxy // parse environment proxy

Loading…
Cancel
Save