SSH port forwarding in Docker

∥☆過路亽.° 提交于 2019-12-02 06:12:44

I found the correct SSH port forwarding command

$> ssh root@mongo -L 27017:localhost:27017 -Nf

Normally the idea with this command is that you map a non-public port - through a public server to you own server/compute.

* `root@mongo` - the public server
* -L <port on your server>:<third server address>:<port>
* `-Nf` - Do not login

Because the public server and third server are the same computer/container you have to use localhost :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!