Ubuntu 10.4
After installation, you can access the Internet in OK. Nat mode. The host machine and client can ping each other.
It mainly checks whether the SSH service and firewall are disabled (SSH is not installed by default in Ubuntu, And the firewall is started by default)
You do not need to set hostonly as in this article. just refer to the SSH service and firewall shutdown commands in this article.
Http://blog.csdn.net/lzx_bupt/article/details/6738186
5) check whether the IP address is correct
The correct indication is that the VM and the host can ping each other and use the statement according to the preceding configuration.
Host Ping VM: Ping 192.168.2.99 VM Ping HOST: Ping 192.168.2.1
Restart the VM if necessary;
3. After the IP address is successfully configured, the host uses securecrt to connect to the virtual machine.
(1) check whether the SSH server is installed on the Virtual Machine and confirm that the service has been started.
Check the SSH installation statement: "rpm-AQ | grep openssh-server"
If openssh-server is not installed (SSH is not installed in Ubuntu by default), you need to find other ways to install OpenSSH-server, such as downloading RPM from the host, or use ISO to install the RPM package (refer to other articles );
If you do not have the root permission (Ubuntu does not have the root password by default, execute the "sudo passwd root" statement to change the root password) and switch the root permission.
Check the SSH service statement: if a process ID exists, it indicates that it has been started.
[Plain]View plaincopy
- [Email protected]: ~ $ PS-E | grep sshd
- 516? 00:00:00 sshd
- 1862? 00:00:00 sshd
- 1988? 00:00:00 sshd
- [Email protected]: ~ $
If the service is not started, Run "service SSH start". If the service process is killed, Run "Kill sshd" or "killall sshd". The correctly started content is as follows:
[Plain]View plaincopy
- [Email protected]:/home/zxliu # netstat-TLP
- Active Internet connections (only servers)
- PROTO Recv-Q send-Q local address foreign address State PID/program name
- TCP 0 0 *: SSH *: * Listen 3448/sshd
- TCP 0 0 localhost: IPP *: * Listen 1287/cupsd
- Tcp6 0 0 [:]: SSH [:]: * Listen 3448/sshd
- Tcp6 0 0 ip6-localhost: IPP [:]: * Listen 1287/cupsd
- [Email protected]:/home/zxliu # ps-E | grep SSH
- 1621? 00:00:00 ssh-agent
- 3448? 00:00:00 sshd
- 3453? 00:00:00 sshd
- 3581? 00:00:00 sshd
- [Email protected]:/home/zxliu #
(2) disable the Virtual Machine Firewall
Generally, you need to disable the firewall and run the "iptables-F" command. Of course, you need the root user;
(3) Use securecrt to connect to the host
Install the software and configure the connection. After all the above steps, the connection will be successful, and the network cable can still be connected. If the server refuses to log on, it indicates that the virtual machine firewall is irrelevant;
4. FAQs and Solutions
(1) If the SSH server rejects the request, it indicates that the firewall of the virtual machine is irrelevant. For details, see section 3.4 disable the firewall.
(2) SSH is not installed in Ubuntu by default. Therefore, in Linux, please confirm to install OpenSSH-server and start the service. See 3.1
(3) Ubuntu does not set the root account password by default. To use the root account, you need to set the password. For details, refer to 3.1.
(4) If the virtual machine and the host cannot Ping each other, they are not set in the same subnet segment. See 2. Compare IP addresses
(5) virtual machines can be interconnected with hosts, but virtual machines cannot be used to access the Internet. This is a limitation of the Host-only mode;
Securecrt SSH VMware Ubuntu