From 414fcf32933f022ec89d6411f09accc507654607 Mon Sep 17 00:00:00 2001 From: dingjun Date: Sat, 8 Apr 2017 11:08:40 +0800 Subject: [PATCH] add HostKeyCallback --- obfssh/ssh.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/obfssh/ssh.go b/obfssh/ssh.go index ca4e300..3accecb 100644 --- a/obfssh/ssh.go +++ b/obfssh/ssh.go @@ -154,6 +154,11 @@ func main() { User: cfg.Username, Auth: auth, 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