当前位置:网站首页>Xshell, putty, SecureCRT cannot connect to virtual machine (connection mode, NAT mode) solution!

Xshell, putty, SecureCRT cannot connect to virtual machine (connection mode, NAT mode) solution!

2020-12-07 10:07:14 osc_ z9t307rr

Xshell Can't connect to virtual machine ?( The virtual machine in this paper uses CentOs7 The image file of )

Method 1 : Whether the initial configuration is the best ?

1. The first step is to use the virtual machine network connection mode NAT Pattern
( Right click the virtual machine to enter the settings )
 Insert picture description here  Insert picture description here
2. see Virtual network adapter VMnet8 (NAT Pattern ) Virtual network card Network segment


 Insert picture description here

Be careful : Remember the subnet here , And subnet mask  Insert picture description here

3. Then modify the host control panel under the network adapter Next Manual configuration modification VMnet 8 Of ipv4
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
4. Here you manually configure ip Address and subnet mask , Remember the subnet and subnet mask you remember above ?
The subnet mask remains unchanged ,ip The address and subnet are in the same network segment , Here is C class ip Address , So just change the last one

 Insert picture description here







Method 2 : uninstall 、 install 、 restart sshd service

1. If the initial configuration of method one is completed , But it didn't connect , We're entering virtual machine operations

The operation command is as follows :
uninstall SSH Use command :# yum remove sshd
reinstall SSH command :# yum install openssh
Turn on ssh The service command :#service sshd start


2. Finally, let's take a look sshd Whether the service is on
The order is as follows :
systemctl status sshd.service
Here you can see that it's turned on , Now it should be xshell You can connect to the virtual machine
 Insert picture description here



版权声明
本文为[osc_ z9t307rr]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201207095618825l.html