Methods Using SSH to connect the virtual machine network


optimization project >




SSH connection:

Shanghai Longfeng topics recommended:


1. in the LAN of company, set up a virtual machine available IP, network settings and the same host (IP is not the same as other


22 port

virtual machine VirtualBox installed a RedHat Enterprise Edition 6

as host port 22 corresponding to the virtual machine, this time I visit the host of the ip:22, the equivalent of a virtual machine access ip:22

Virtual machine using

the above settings, the virtual machine can access the Internet through the host. However, how to access the host virtual machine

, a port access to the machine, a port will be forwarded directly to the corresponding virtual machine on

Method Using SSH to connect the virtual machine network

At the same time, the

connection www.2cto贵族宝贝

SSH IP is configured for a host of IP, namely, port 22. You can imagine, in fact, this connection is 22 port access to the virtual machine. Which port do host use (not necessarily the same port and virtual machine), is not 22, but because the virtual machine is a SSH service, so is the 22 port. That is to say, the host port 400 port 22 can also map the virtual machine.

port mapping:

It is





virtual machine Port Forwarding set up the mapping relationship: www.2cto贵族宝贝


host windows xp

2. if there is no need to use the LAN environment, port mapping method (port forwarding

VirtualBox NAT, the host will appear in a IP network connection:


principle can refer to 贵族宝贝2cto贵族宝贝/os/201202/119950.html



NAT can refer to 贵族宝贝baike.baidu贵族宝贝/view/16102.htm

Leave a comment

Your email address will not be published. Required fields are marked *