Fix SSH error: ssh: must specify HostKeyCallback

This commit is contained in:
Dan Sosedoff 2018-12-14 19:56:33 -06:00
parent c4e63dcc85
commit 2bd9f39da5
2 changed files with 4 additions and 1 deletions

View File

@ -9,9 +9,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/jmoiron/sqlx"
"github.com/sosedoff/pgweb/pkg/command" "github.com/sosedoff/pgweb/pkg/command"
"github.com/sosedoff/pgweb/pkg/connection" "github.com/sosedoff/pgweb/pkg/connection"
"github.com/sosedoff/pgweb/pkg/history" "github.com/sosedoff/pgweb/pkg/history"

View File

@ -86,6 +86,9 @@ func makeConfig(info *shared.SSHInfo) (*ssh.ClientConfig, error) {
User: info.User, User: info.User,
Auth: methods, Auth: methods,
Timeout: time.Second * 10, Timeout: time.Second * 10,
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
return nil
},
} }
return cfg, nil return cfg, nil