connection to mongodb with ssh using c# driver

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Blocker - P1
    • None
    • Affects Version/s: 2.2.3
    • Component/s: Connectivity
    • None
    • Environment:
      Windows application running in .net against mongodb env on aws hosted in linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      how can we connect with ssh to mongodb server which located in aws and hosted in Linux server.
      we are getting a timeout when trying to connect to the mongo client.
      we are working in .net application using c# driver and trying to connect via ssh client.
      the following is snippet from our code:
      using (var client = new SshClient("<ip of aws machine>", 22, "mongodb user", "password"))

      { client.Connect(); var connectionString = "mongodb://root:passwordOfMongoDB@localhost:27017"; MongoClient MongoClient = new MongoClient(connectionString); IAsyncCursor<BsonDocument> lst11 = MongoClient.ListDatabases(); client.Disconnect(); }

              Assignee:
              Unassigned
              Reporter:
              avi inbar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: