From 2bd9f39da568f76a887ab7b21a003637633470bb Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Fri, 14 Dec 2018 19:56:33 -0600 Subject: [PATCH] Fix SSH error: ssh: must specify HostKeyCallback --- pkg/client/client.go | 2 +- pkg/client/tunnel.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index 06be530..89a8a95 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -9,9 +9,9 @@ import ( "strings" "time" + "github.com/jmoiron/sqlx" _ "github.com/lib/pq" - "github.com/jmoiron/sqlx" "github.com/sosedoff/pgweb/pkg/command" "github.com/sosedoff/pgweb/pkg/connection" "github.com/sosedoff/pgweb/pkg/history" diff --git a/pkg/client/tunnel.go b/pkg/client/tunnel.go index db167e5..94a937d 100644 --- a/pkg/client/tunnel.go +++ b/pkg/client/tunnel.go @@ -86,6 +86,9 @@ func makeConfig(info *shared.SSHInfo) (*ssh.ClientConfig, error) { User: info.User, Auth: methods, Timeout: time.Second * 10, + HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error { + return nil + }, } return cfg, nil