tunnel-ssh | fantastic ssh2 library by Brian White | SSH Utils library
kandi X-RAY | tunnel-ssh Summary
kandi X-RAY | tunnel-ssh Summary
One to connect them all !. Tunnel-ssh is based on the fantastic [ssh2] library by Brian White. Trouble ? Please study the ssh2 configuration.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create an ssh server
- Create SSH config
- Connect to a local server .
- Bind ssh to an ssh connection .
- Create a socket client .
- Return a copy of the object excluding the specified keys .
tunnel-ssh Key Features
tunnel-ssh Examples and Code Snippets
Community Discussions
Trending Discussions on tunnel-ssh
QUESTION
I have a server on which I am running a MongoDB. I set it up with an admin
database and a user that has read-write-priviliges for all databases (readWriteAnyDatabase). Additionally, I enabled authorization to be necessary in the mongod.conf
(security: authorization: "enabled"
). The server also has ssh.
Now I am trying to access that database from my laptop using mongoose
and tunnel-ssh
:
ANSWER
Answered 2021-Jun-29 at 01:18If the user was created in the admin database, but you want to connect to a different database using the URI, you will need to specify authSource in the URI so the right user account can be found.
QUESTION
I have an ssh config file like this. I have a proxy jump to host1 from test2.
...ANSWER
Answered 2021-Jun-11 at 04:04I am able to connect to the database now.
Make a tunnel through Bastion to the Database from the terminal.
ssh -L 27017:{mongodb-host}:27017 host1
I am able to connect to database via the tunnel from localhost in another terminal.
mongo --host 127.0.0.1:27017 --username {username} --password {password}
So I am able to connect through mongoose too using connection string. mongodb://dbadmin:{username}:{password}@localhost:27017
QUESTION
I have a droplet in Digital Ocean that is running MongoDB (4.0.3) and Ubuntu (18.04). I created this with their one-click formation. I followed the digital ocean tutorials to secure mongodb and to configure remote access. Everything works great if I ssh into the box and use the mongo shell. However, I am having trouble establishing a connection to the server from my laptop via nodejs/mongoose.
Can you help me figure out what is incorrect with my configuration? Or help me interpret the error messages
Here is what is working:
- [terminal] -
ssh
into the box and usemongo
shell - [node] - using
tunnel-ssh
I can establish a connection to the remote server - [node] - using the npm
mongodb
package I can create a connection to the database
However, I am unable to make a connection with mongoose
using tunnel-ssh
. Here is the code I am trying:
ANSWER
Answered 2020-Nov-19 at 21:04You know when you ask a question and then 1 minute later you think of something new to try, and that new thing completely works?
I think I don't need to use tunnel-ssh
at all because I already opened the server to allow remote access from my laptop. This works for me
QUESTION
I'm trying to integrate mongoDB to Dialogflow. More specifically, I'm trying to change the value of a particular data field called 'lightState' in a MongoDB database installed in AWS EC2 instance, by using DialogFlow. When I say 'Turn the light on', the data 'lightState' has to be updated to the value 1 and 0 for the opposite.
Before heading to the real question, I will post my code below:
...ANSWER
Answered 2020-May-24 at 14:16The issue is that you're re-establishing the tunnel to the server inside the onRequest
handler. This will be done every time your webhook is called without shutting it down, so the address remains in use and the error is thrown.
Better probably would be to setup the server
when the function is initialized - so outside the onRequest
handler.
[update once you tried to setup server
outside onRequest
]
The reason it's telling you that it can't find a function is because you have the export
statement inside the callback function that tunnel()
calls. Exports must be done at load time, not when the script is executed
The easiest solution is to not have a callback when you setup the tunnel (or to just use it to record success or error). So something like
QUESTION
When I start Express, it crashes in about 5 minutes.
Use this dependencies.
- express 4.17.1
- mongoose 5.9.7
- tunnel-ssh 4.1.4
wait about 5 min after, got an error like this.
...ANSWER
Answered 2020-May-01 at 16:38SOLVED
QUESTION
I'm trying to connect to mongodb(mongodb package) using the tunnel-ssh package. It gets connected and I can log the db but it immediately throws an error and disconnects.
...ANSWER
Answered 2020-Feb-19 at 06:52I have not used the tunnel-ssh
package you have mentioned, but I went through the docs and I see that you are using it wrong. I simply copied the configuration given in the docs of tunnel-ssh
and it started working for me. pasting the entire code below
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tunnel-ssh
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page