jackc / tern

The SQL Fan's Migrator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSH tunnel fails: "ssh: must specify HostKeyCallback"

danielstandby opened this issue · comments

This is what I did:

  1. Installed go and tern
  2. Configured a tern.conf file with [database] and [ssh-tunnel] entries
  3. Added SSH private key to ssh-agent
  4. Created a dummy migration file
  5. Tried to execute tern migrate but got the following error:
Unable to connect to PostgreSQL:
  ssh: must specify HostKeyCallback

Seems that from version 1.8.3, Go made some braking changes on SSL connections: golang/go#19767

I made a small change to use the user's known_hosts file if possible.