Virtual box is a highly popular open-source Virtual Machine Software with powerful functions. Articles about it are everywhere on the Internet.
Virtual box was installed in WINXP some time ago, and then Linux was installed in virtual box (Linux is often called Linux guest here, for fear of misunderstanding after translation, the official name is used ). However, after Linux is started, you cannot directly connect to Linux through SSH in WINXP. I checked a lot of information, tried a lot, and finally got it done. I posted it to share it with you.
Step 1: first select "Settings" in the virtual Box console and select "network" in the list on the left ", change the connection method of "adapter 1" on the right to "host interface ".
Step 2: switch to the installation environment of virtual boxin the command terminal of WINXP and find the “vbmanager.exe command.
Step 3: execute the following three commands:
> Vboxmanage setextradata <guestname> "vboxinternal/devices/pcnet/0/Lun #0/config/ssh/hostport" 222
> Vboxmanage setextradata <guestname> "vboxinternal/devices/pcnet/0/Lun #0/config/ssh/guestport" 22
> Vboxmanage setextradata <guestname> "vboxinternal/devices/pcnet/0/Lun #0/config/ssh/protocol" TCP
Idea: hostport must be an integer greater than 1024. This is the official recommendation, but the specific reason is not clear.
Pcnet is the network card model. You can determine the network card model in the first step. If the network card model is set incorrectly, Linux guest cannot be started. In this case, you need to manually edit the virtual machine configuration file to correct the error.
After the preceding three steps are complete, start Linux guest and log on to Linux directly from the SSH client under WINXP.
Enjoy it!
2009/12/21