From ff692e3f5f5f319521d7c994170fad2fecd42db1 Mon Sep 17 00:00:00 2001 From: aLog Date: Fri, 4 Oct 2019 16:36:17 +0300 Subject: [PATCH] add modules and fix issue-19767 --- go.mod | 13 +++++++++++++ go.sum | 17 +++++++++++++++++ ssh.go | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 go.mod create mode 100644 go.sum diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..577150a --- /dev/null +++ b/go.mod @@ -0,0 +1,13 @@ +module github.com/pressly/sup + +go 1.13 + +require ( + github.com/goware/prefixer v0.0.0-20160118172347-395022866408 + github.com/kr/pretty v0.1.0 // indirect + github.com/mikkeloscar/sshconfig v0.0.0-20161223095632-fc5e37b16b68 + github.com/pkg/errors v0.7.1-0.20160627222352-a2d6902c6d2a + golang.org/x/crypto v0.0.0-20160804082612-7a1054f3ac58 + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/yaml.v2 v2.0.0-20160301204022-a83829b6f129 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d93e3df --- /dev/null +++ b/go.sum @@ -0,0 +1,17 @@ +github.com/goware/prefixer v0.0.0-20160118172347-395022866408 h1:Y9iQJfEqnN3/Nce9cOegemcy/9Ai5k3huT6E80F3zaw= +github.com/goware/prefixer v0.0.0-20160118172347-395022866408/go.mod h1:PE1ycukgRPJ7bJ9a1fdfQ9j8i/cEcRAoLZzbxYpNB/s= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mikkeloscar/sshconfig v0.0.0-20161223095632-fc5e37b16b68 h1:Z1BVWGqEm0aveMz9ffiFnJthFjM5+YFdFqFklQ/hPBI= +github.com/mikkeloscar/sshconfig v0.0.0-20161223095632-fc5e37b16b68/go.mod h1:GvQCIGDpivPr+e8cuBt3c4+NTOJm66zpBrMjkit8jmw= +github.com/pkg/errors v0.7.1-0.20160627222352-a2d6902c6d2a h1:dKpZ0nc8i7prliB4AIfJulQxsX7whlVwi6j5HqaYUl4= +github.com/pkg/errors v0.7.1-0.20160627222352-a2d6902c6d2a/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +golang.org/x/crypto v0.0.0-20160804082612-7a1054f3ac58 h1:ytej7jB0ejb21kF+TjEWykw7n4sG85mxyjgYHgF/7ZQ= +golang.org/x/crypto v0.0.0-20160804082612-7a1054f3ac58/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.0.0-20160301204022-a83829b6f129 h1:RBgb9aPUbZ9nu66ecQNIBNsA7j3mB5h8PNDIfhPjaJg= +gopkg.in/yaml.v2 v2.0.0-20160301204022-a83829b6f129/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= diff --git a/ssh.go b/ssh.go index eb3cefb..e84bf60 100644 --- a/ssh.go +++ b/ssh.go @@ -139,6 +139,9 @@ func (c *SSHClient) ConnectWith(host string, dialer SSHDialFunc) error { Auth: []ssh.AuthMethod{ authMethod, }, + HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error { + return nil + }, } c.conn, err = dialer("tcp", c.host, config)