Create SSH Tunnel

ssh -L 8888:127.0.0.1:27017 adierebel@remote-host.com

enter your ssh password, if success you will see ssh welcome message.

Connect with mongo client

mongo 127.0.0.1:8888/

Dump database

mongodump --host=127.0.0.1 --port=8888 --db=database_name

Logout SSH Tunnel

List connection

~#

Close connection

~&

Comments (0)