jackc / tern

The SQL Fan's Migrator
MIT License
925 stars 68 forks source link

SSH tunnel fails: "ssh: must specify HostKeyCallback" #30

Closed danielstandby closed 3 years ago

danielstandby commented 3 years ago

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: https://github.com/golang/go/issues/19767

jackc commented 3 years ago

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