Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1613

connection to mongodb with ssh using c# driver

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

      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 Unassigned
            Reporter:
            avi74 avi inbar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: