问题:
Want to improve this question? 想改善这个问题吗? Update the question so it's on-topic for Stack Overflow. 更新问题 ,使其成为Stack Overflow 的主题 。
Closed 10 months ago . 10个月前关闭。
I have a Ubuntu VM running on my Windows 7 machine. 我的Windows 7计算机上运行的是Ubuntu VM。 How do I set it up so that I can access the webserver externally through SSH? 如何设置它以便可以通过SSH从外部访问Web服务器?
I found steps ( Setup SSH access between VirtualBox Host and Guest VMs ) to be able to ssh to my guest from my host, but that still leaves me with the problem of accessing it through my router. 我发现了一些步骤( 在VirtualBox主机和来宾VM之间进行设置SSH访问 )可以从主机向ssh来宾,但是仍然存在通过路由器访问它的问题。
I suppose that I could install an SSH server on my Windows machine and then tunnel a few times (though I'm not 100% sure what to use in terms of local, dynamic, etc. or how to set up multiple tunnels?), but is there a way to make the VM directly accessible to my router so I could directly port forward to it? 我想我可以在Windows机器上安装SSH服务器,然后进行几次隧道传输(尽管我不确定100%确定要使用本地,动态等等,还是如何设置多个隧道?),但是有没有一种方法可以使我的路由器直接访问VM,以便我可以直接移植到它?
解决方案:
参考一: https://stackoom.com/question/OmXB/如何通过主机从外部SSH到VirtualBox来宾-关闭参考二: https://oldbug.net/q/OmXB/How-to-SSH-to-a-VirtualBox-guest-externally-through-a-host-closed
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4271361