title: Connecting to remote MongoDB - SSH issues
body: <p>I'm trying to connect to a remote MongoDB server over using a GUI, and also via the command line but think I'm having issues with the SSH part.</p>
  
  <p>I believe there's something configured on the remote server that's not allowing the SSH tunnel and I'm not sure where to start looking, bear in mind that I don't yet have sudo access.</p>
  
  <p>I can connect to the remote server using standalone SSH tools no problem (putty, ssh via command line, winscp), but trying to connect to MongoDB fails</p>
  
  <p>I've tried creating a tunnel between my machine and the remote machine</p>
  
  <pre><code>ssh -i ~/.ssh/private-key -N -L27018:localhost:27017 user@site.com -vvv
  </code></pre>
  
  <p>Then on my machine I run the following</p>
  
  <pre><code>$ mongo --port 27018
  MongoDB shell version: 2.6.10
  connecting to: 127.0.0.1:27018/test
  2017-08-08T08:28:36.152+0000 DBClientCursor::init call() failed
  2017-08-08T08:28:36.153+0000 Error: DBClientBase::findN: transport error: 127.0.0.1:27018 ns: admin.$cmd query: { whatsmyuri: 1 } at src/mongo/shell/mongo.js:148
  exception: connect failed
  </code></pre>
  
  <p>With the tunnel log showing this</p>
  
  <pre><code>debug1: Connection to port 27018 forwarding to localhost port 27017 requested.
  debug2: fd 6 setting TCP_NODELAY
  debug2: fd 6 setting O_NONBLOCK
  debug3: fd 6 is O_NONBLOCK
  debug1: channel 2: new [direct-tcpip]
  debug3: send packet: type 90
  debug3: receive packet: type 92
  channel 2: open failed: administratively prohibited: open failed
  debug2: channel 2: zombie
  debug2: channel 2: garbage collecting
  debug1: channel 2: free: direct-tcpip: listening port 27018 for localhost port 27017, connect from 127.0.0.1 port 41672 to 127.0.0.1 port 27018, nchannels 3
  debug3: channel 2: status: The following connections are open:
  </code></pre>
  
  <p>As a test I setup a vagrant machine with mongodb on it and was able to connect from my host machine via the command line and via a GUI.</p>
  
  <p>Are there anything specific configuration variables that might prevent me from connecting via SSH?</p>
  
  <p>The remote server has these settings but toggling them on the vagrant machine didn't make a difference, I was still able to connect</p>
  
  <pre><code>#bind_ip = 127.0.0.1
  </code></pre>