Enter Guestos:
#/sbin/ifconfig
View Inet addr:10.0.2.15
Then go to Hostos, look at the control Panel, look at the network and Sharing center of VirtualBox Host-only
IP address of the IPv4 property: 192.168.56.1
Ready enough, the following decisive configuration:
The default port for Notes:ssh is 22
Open VirtualBox Settings window-〉 Network-〉adapter1 Enable network connection-〉 Connection: Nat---access network cable
Port Forwarding, set as follows:
Map the TCP protocol's 192.168.56.1:2222 to 10.0.2.15:22.
Restart the virtual machine Linux.
Open the SSH login tool, such as putty
Session-> Host name (or IP address) 192.168.56.1; port:2222-Open
Enter USERNAME/PASSWD to log in as expected.
The actual login process host through port forwarding help us to complete, will 192.168.56.1:2222 information forwarded to the virtual machine Linux 10.0.2.15:22