SSH connection configuration for a virtual operating system built on a NAT network

Source: Internet
Author: User
I. environment List 1. main operating system: windows7-x642, virtual system: ubuntu-12.043, virtual system tools: VirtualBox-4.2.6www.2cto.com 2. master-slave network relationship after VirtualBox installation is complete, the default connection mode is NAT, this method can be used directly in the virtual...
I. environment List 1. main operating system: windows7-x642, virtual system: ubuntu-12.043, virtual system tools: VirtualBox-4.2.6
Www.2cto.com 2. after the master-slave network relationship VirtualBox is installed, the default connection mode is "NAT". you can use this method to directly access the network in the virtual system, of course, it is based on the fact that the real host can access the network. However, this NAT mode is out of the routing mode. the virtual system depends on the real system, but not the parallel mode. In this way, you can access the virtual system through the Real host system without a network. Open the network configuration of the virtual system and you can see the following information:
The default listening port of ssh is 21. now you need to map the port accessed from the Master System to port 21 of the virtual system in virtualbox. Click "port forwarding" and configure the host port according to your needs and system constraints.
3. start the ssh service www.2cto.com in the virtual linux system and run the Shell code ps-e | grep ssh command to check whether there is an ssh process. if only the ssh-agent is displayed, it indicates that there is no ssh-server in linux. First, check whether the system has installed ssh-server. if so, run the shell code sudo/etc/init. d/ssh start to start the ssh service. If the ssh-server is not installed, run the shell command to install it, provided that the service is started by default after the network Shell code sudo apt-get install openssh-server is installed. If not, use the startup command mentioned above to start the service. Www.2cto.com 4. in the main system to try ssh to the virtual system, the client tool is Xshell, such as the command ssh william@127.0.0.1 22222, please pay attention to the host in this place, will prompt you to enter the password later, after verification, you can ssh to the virtual system. Have you seen "welcome" below me ??
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.