The following can not connect the problem, the source is
http://m.blog.csdn.net/article/details?id=52755571
1, Centos7 IP, here the ENP0S3 equivalent to Eth0, is a default network system
Take a look
Modify IFCFG-ENP0S3 (Onroot=yes)
Restart Network: Service network restart
Ifconfig again, view IP
The IP of the ENP0S3 is accurate.
2, here can set up the Xshell
If you can connect, there's no problem.
If not, take a look.
Under Virtual machine (Vmware Workstation), CentOS7 is installed and now you want to connect the CentOS7 in the virtual machine via the SSH tool
1, first, to ensure that CentOS7 installed openssh-server, in the terminal to enter the yum list installed | grep openssh-server
This shows that Openssh-serveris already installed and if no output is displayed indicating that no openssh-serveris installed, by entering yum install Openssh-server
To install the openssh-server
2, found the /etc/ssh/ directory of the SSHD service profile Sshd_config, with the Vim editor open
Remove the # number in the file, about the listening port and the listening address
Then turn on Allow Telnet
Finally, turn on use user name password to authenticate as connection
Save file, exit
3. turn on the sshd service and input sudo services sshd start
Check if the SSHD service is turned on, enter ps-e | grep sshd
or enter Netstat-an | grep to check if the port is open for monitoring
4. in VMware Workstation, view the properties of the CentOS7 and discover how the network connection is connected using NAT
5, in the VMware Workstation, click edit = " Virtual network editor , go to the Virtual network editor, see the connection to find NAT mode with the network adapter name VMnet8
6, in the Windows host, enter ipconfig on the command line to view the host IP, locate the VMNET8 connection information, where IP is 192.168.30.1
7. in CentOS, enter ifconfig to view the network connection address and discover that the CentOS network address is 192.168.112.128
8, in CentOS, the input ping 192.168.30.1 test can connect the host, found that can connect
9, in the host, enter ping 192.168.112.128, test host can connect CentOS, found not connected
If it makes sense, you can skip to step 12th.
10, in the host, open the network configuration, select the network adapter VMnet8 Tcp/ipv4 Properties, do a network configuration
Requires subnet mask, default network Guan Jin and CentOS consistent, and the IP address is modified to 192.168.112.1, that is, ensure that the IP of the host and the CentOS IP are in the same network segment
11, again in the host, input ping 192.168.112.128, can be connected to the
13, in order to avoid each time you open the CentOS, you have to manually open the SSHD service, you can add the SSHD service to the self-launch list, enter systemctl enable Sshd.service
You can check if the SSHD service is powered on by entering systemctl list-unit-files | grep sshd
Connection of Xshell and VirtualBox virtual machine CentOS7