Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Solved! Go to Solution.
@Anonymous
What’s the error message you got?
By default, MongoDB is not allowed to remote access, you need to enable remote access by modifying mongod.conf file.
See: MongoDB – Allow remote access
Then to connect to MongoDB via an SSH tunnel, we need to setup the tunnel separately with an SSH client.
For example the mongolite manual contains this example:
con <- mongo("mtcars", url = "mongodb://readwrite:test@ds043942.mongolab.com:43942/jeroen_test")
Assume we want to tunnel through dev.opencpu.org which runs an SSH server on the standard port 22 with username jeroen. To initiate a tunnel from localhost:9999 to ds043942.mongolab.com:43942 via the ssh server dev.opencpu.org:22, open a terminal and run:
ssh -L 9999:ds043942.mongolab.com:43942 jeroen@dev.opencpu.org -vN -p22
At last, we can connect to our ssh client which tunnel traffic to MongoDB server. In this example we run the ssh client on localhost port 9999:
con <- mongo("mtcars", url = "mongodb://readwrite:test@localhost:9999/jeroen_test")
con$insert(mtcars)
For more information, please check : SSH Tunnel
Regards,
Pirlo Zhang
@Anonymous
What’s the error message you got?
By default, MongoDB is not allowed to remote access, you need to enable remote access by modifying mongod.conf file.
See: MongoDB – Allow remote access
Then to connect to MongoDB via an SSH tunnel, we need to setup the tunnel separately with an SSH client.
For example the mongolite manual contains this example:
con <- mongo("mtcars", url = "mongodb://readwrite:test@ds043942.mongolab.com:43942/jeroen_test")
Assume we want to tunnel through dev.opencpu.org which runs an SSH server on the standard port 22 with username jeroen. To initiate a tunnel from localhost:9999 to ds043942.mongolab.com:43942 via the ssh server dev.opencpu.org:22, open a terminal and run:
ssh -L 9999:ds043942.mongolab.com:43942 jeroen@dev.opencpu.org -vN -p22
At last, we can connect to our ssh client which tunnel traffic to MongoDB server. In this example we run the ssh client on localhost port 9999:
con <- mongo("mtcars", url = "mongodb://readwrite:test@localhost:9999/jeroen_test")
con$insert(mtcars)
For more information, please check : SSH Tunnel
Regards,
Pirlo Zhang
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |