VirtualBox two network card configuration:
A:host-only mode: Address 192.168.56.1netmask 255.255.255.0 does not enable DHCP service. B:nat mode: Address 10.0.2.0/24netmask 255.255.255.0 enable DHCP service
Network configuration for virtual machines:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/B9/wKiom1WDyUvTIhzxAAHPG1uSyZE046.jpg "title=" g3j ' L ( Lt43p0bud4tz0gmi7.png "style=" Float:none; "alt=" wkiom1wdyuvtihzxaahpg1usyze046.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/B6/wKioL1WDyv3SfHQ_AAHQqDdByhg869.jpg "title="]}) 9w@a9x$lc7zl[) v3}x@c.png "style=" Float:none; alt= "Wkiol1wdyv3sfhq_aahqqddbyhg869.jpg"/>
Configuration complete begins the installation of the Ubuntu operating system.
Installation complete, Ubuntu OS network configuration:
auto eth0iface eth0 inet static address 192.168.56.3netmask 255.255.255.0gateway 192.168.56.1auto eth1iface eth1 inet static address Reboot the system after the 10.0.2.3netmask 255.255.255.0dns-nameservers 8.8.8.8 configuration is complete. [email protected]:~$ route -n kernel ip routing tabledestination Gateway Genmask flags metric ref use iface0.0.0.0 10.0.2.1 0.0.0.0 ug 0 0 0 eth110.0.2.0 0.0.0.0 &nbsP; 255.255.255.0 u 0 0 0 eth1192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 the default gateway :10.0.2.1 if it shows:[email protected]:~$ route -n kernel ip routing . tabledestination gateway genmask flags metric ref Use Iface0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth010.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1192.168.56.0 0.0.0.0 255.255.255.0 u 0 0 0 eth0
Execute the following command:
[Email protected]:~$ sudo route del dafault GW 192.168.56.1 eth0 [email protected]:~$ sudo route add dafault GW 10.0.2.1 eth1 here Ping baidu.com on the pass. Execute sudo apt-get update-y (This step is important if you do not perform the download installation later)
Xshell cannot connect remotely:
[email protected]:~$ ps aux |grep ssh root 2045 0.0 0.1 61364 3064 ? Ss 15:18 0:00 /usr/sbin/sshd -Droot 2106 0.0 0.2 121952 4624 ? ss 15:24 0:00 sshd: hangtiangazi [priv]hangtia+ 2155 0.0 0.1 121952 2220 ?        S    15:24   0:00 SSHD: [email protected]/0hangtia+ 2286 0.0 0.0 10464 920 pts/0 s+ 16:16 0:00 grep --color=auto ssh If there is no sshd process, cd /etc/init.d/ls |grep ssh if any, start SSH service sudo ./ssh start if not executed:sudo The Apt-get install -y openssh-serversudo ./ssh start xshell end landed successfully.
This article is from the "Gaogaozi" blog, make sure to keep this source http://hangtiangazi.blog.51cto.com/8584103/1663594
Virtualbox-ubuntu Network configuration to surf the internet and log in via Xshell