Linux creates a virtual machine, Xshell connects to the virtual machine, Xshell cannot link to Ubuntu solution

Create a virtual machine in three steps

1. Install Linux hardware

1. Select Custom, click Next
insert image description here
2. Continue to the next step
insert image description here
3. The next step prompts to install the operating system, we first install the hardware and then install the operating system
insert image description here
4. Select the Linux operating system, and then select CentOs7 64-bit in the version
insert image description here
5. Give the virtual machine a name, name it Cryptography here, and choose your own installation location
insert image description here
6. Configure the parameters of the processor, do not exceed the total number of CPUs of the local computer, my CPU has eight (how to check the number of CPUs? See the picture below 1 and Figure 2), so configure like this
insert image description here
insert image description here
Configure the processor of the virtual machine
insert image description here
7. Configure the memory of the virtual machine, I choose 4G, click Next
insert image description here
8. Network type, select NAT, select bridge may cause insufficient ip address insert image description here
9. Select recommended , click Next
insert image description here

10. Select Recommended, click Next
insert image description here
11. Select Create New Virtual Machine
insert image description here
12. Select Split
insert image description here
13. Select Path
insert image description here
15. Click Finish

Two, Linux installation software

1. Install the image, click OK
insert image description here
2. Then start the virtual machine

3. Set language
insert image description here

4. Select the date and time
insert image description here
insert image description here
5. Come to the software selection, select the desktop installation

insert image description here

insert image description here
7. Select the installation location
insert image description here
, select the partition I want to configure, and then click Finish
insert image description here
insert image description here
insert image description here
to continue adding the mount node
insert image description here

Click Finish to accept the changes
insert image description here
8. Configure the network and host name
insert image description here
insert image description here
9. Check whether the security policy is enabled, generally it is enabled by default
10. Turn on the virtual machine
11. We can set the root password during the installation of the virtual machine 12.
insert image description here
insert image description here
Restart after the installation is complete
insert image description here
.click permission
insert image description here

insert image description here
Click to complete the configuration
insert image description here

14. Click forward until the time zone appears

insert image description here

15. Click Skip
insert image description here
16. Set username and password, then go forward
insert image description here
insert image description here

17. Then enter the Linux graphical operating system, click Edit
insert image description here
to modify the gateway
insert image description here
18. Modify the Ethernet adapter option locally,
insert image description here
insert image description here
select 4, double-click
insert image description here

insert image description here
19 modify ip

#先切换到root用户下命令
su root
#进入网络设置命令
vim /etc/sysconfig/network-scripts/ifcfg-ens33 

insert image description here
20. Modify the host name

#修改主机名称
vim /etc/hostname 

insert image description here

21. Restart
22. Check the network and test whether the network is smooth
insert image description here

3. Remote connection

insert image description here

Other appearance settings can be set according to your own preferences

Four, Xshell link Ubuntu error

When Xshell cannot connect to Ubuntu, first try the command to check whether your ip is entered correctly

ifconfig

insert image description here
Then check whether your network is unobstructed, use the command

ping www.baidu.com

insert image description here
Download related dependencies, execute the following command

sudo apt install poenssh-ser

insert image description here
Re-execute

sudo service ssh start

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/qq_41977843/article/details/125459220