Problems with SSH connection to linux in vm

Source: Internet
Author: User
First, I use the NAT method, as shown below: Right-click on the desktop -- & gt; OpenTerminal, enter: ifconfig, and then enter: ifc

First, I use the NAT method as follows:


Right-click the desktop --> Open Terminal, and enter: ifconfig


Enter ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up, as shown below:


Select System --> Administration --> Network, as shown in the figure below: VcD4KPHA + pgltzybzcm9 "" alt = "\">

Open the Network and obtain the following interface:


Double-click eth0 to get the following interface:


View the VMware Network Adapter VMnet8 Nic in windows, as shown below:


Select Statically set IP addresses. in Addresse, enter 192.168.230. * (* <255, which is the address you connected through ssh) based on the IPv4 address 192.168.230.1. enter the following:


Click OK, and then click Activate:


Then you can connect to the linux system in the virtual machine through ssh, as shown below:


Click Connect and enter the password. the logon is successful, for example:


Now, the network configuration of the virtual machine linux system is complete.

Some problems encountered in this process, such:

Vware linux: Device eth0 has different MAC
Because the virtual machine in the House has not been used for a long time, today we suddenly need to update a program. when starting the virtual machine, we cannot log on remotely.

Service network restart has an error.

"Shutting down interface eth0: Device eth0 has different MAC address than expected, ignoring ."

It is estimated that the physical address of the NIC conflicts. Refer to the above post to get it done and make a mark!

It helped me find the right file to edit:

/Etc/sysconfig/network-scripts/ifcfg-eth0

Just updated the HWADDR value and rebooted the system.

Modify HWADDR to the ethernet0.generatedAddress in Red Hat Enterprise Linux 4.vmx.

In this case, you can click Probe in the following interface. it will automatically update the physical address of the NIC, and then solve the problem that ssh cannot connect to linux due to the above reasons.


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.