I'm playing with MongoDB. I have a good deal of experience with MySQL and was using something called Sequel Pro to connect to remote databases. I'm now trying MongoHub but can't seem to get it to connect to the remote database.
I tried a basic SSH tunnel
ssh -f user@remotehost.com -L 9009:remotehost.com:27017 -N
But this didn't work. How do other DB management tools use a ssh login to provide a connection to the database that doesn't have an open port? Is this something I could setup by myself (via a tunnel or something else)?
From serverfault
Josh K
-
Here's what I do to get to my remotely mysql server (I've got mysql restricted to localhost only):
ssh -fNL 9999:localhost:3306 myuser@myremotemachineTo describe it,
- -f puts it in the background
- -N tells ssh there is no command to execute
- -L 9999:localhost:3306 tells to bind the local port 9999 to 3306 remotely.
Then I use MySQL Query browser and tell it to connect to 127.0.0.1 port 9999
So I suppose you could try:
ssh -fNL 9009:localhost:27017 myuser@myremotemachineFrom Weboide
0 comments:
Post a Comment