重要: 注释掉mongodb配置 # bind_ip = 127.0.0.1

  1. forword 端口27017到宿主机

  2. 使用ssh tunnel方式连接

    SSH Host = 127.0.0.1

    SSH Port = 2222

    Username = vagrant

    Password = vagrant

    key = ~/.vagrant.d/insecure_private_key