I am receiving the error Open failed: administratively prohibited
when trying to connect to a mongodb
database over ssh.
From other SO posts it seems that this might be caused by a variable AllowTcpConnections yes
in /etc/sshd/sshd_config
.
So I made sure the variable was correctly set on my server - I also tried with other port (like 8888 for jupyter notebook, or other and they did work!)
Is there anything specific to mongodb / or that port regarding that matter?
According to this post:
https://ianlondon.github.io/blog/mongodb-auth/
You need to do three things:
1) Edit the MongoDB config file:
sudo vim /etc/mongod.conf
2) comment out the bindIp
line:
# bindIp: 127.0.0.1 <- comment out this line
3) uncomment the security
line:
security:
authorization: 'enabled'
Finally, you should have some authorization credentials that allow you to connect remotely (username/password or ssh key, etc).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.