VM+Ubuntu+Xshell+Xftp installation tutorial

Table of contents

 

VM17 installation tutorial

check network connection

Ubuntu environment setup

UBUNTU system configuration

1. SSH server configuration server (required)

1. Install ssh server

2. Confirm whether sshserver is started (seeing sshd indicates it has been started)

3. Start sshserver

4. SSH configuration (if required)

5. Restart sshserver

6. Check whether the network tools are installed

2. Xshell installation under Win11

Use XShell to connect to Linux server

3. Xftp installation under Win11

File transfer demo for xftp


 

VM17 installation tutorial

Window11 installs VM16 or above. You can download the required files through the network disk.

448bfc1597414c5c8b310273d1b84626.png

https://pan.baidu.com/s/1NdZrW1a0oOc9waFzqbH6pQ?pwd=gm7a
提取码:gm7a 

You can also download VMware Workstation Pro | CN here

988e06e4b0ad403f87ad28c79b532b14.png

ccacff37ba764e59b17e3920bfe8fd75.png

64ed9dd61e234f71b88c310b34429a77.png

33f4cdebd2454dc5b7fb534e7660a0da.png

93029ef3fa3346468014241a275ce4b2.png

c1f4450bc00b43859153252dc6ec5122.png

I found an available VMware 17 (with download link) on Zhihu (zhihu.com) . You can check out the first comment there, which is very interesting.

c72af5181d1b4fd1afff36bc05fe1914.png

It will automatically help you locate  the network connection and check whether the current page has  the two network cards VMnet1  and  VMnet8  (and are enabled). If the virtual machine is not enabled, you will not be able to connect to the Internet.

check network connection

Open the network connection and check whether the virtual machine can connect to the Internet normally;

Win + R, enter ncpa.cpl, check the network connection

c5c3a012671d4c2ea8fa457f773a1552.png

Ubuntu environment setup

None, I didn’t create it. I heard that creating a new one is very troublesome, so just use the ready-made ones here.

5459aa1ee0f445a6bd2c7aa116fa895a.png

23bd3356d11143348a877898fb3679e8.png

Extract the above folder to the D drive or E drive, not the folder with Chinese characters outside.

965d857b94524dafb9280982a40c0471.png

The login password is "kivenfly".

Check yourself to see if you can access the Internet. There is a bit of a lag when using this virtual machine to access the Internet. I originally wanted to log in, but I was stuck.

0fea52232fb3480f9f8a676ec8cf4473.png

After the virtual machine is installed, to enable the virtual printer, edit (Preferences) - Settings - Devices.

a5a9a7daa7c7473b88c5015f73bd8875.png

Press "ctrl+alt+t" to open the terminal and start the superuser password;

The steps to set the super user password are:

  • ①Enter "sudo passwd"
  • ②Enter the "current user password" to temporarily switch to superuser mode
  • ③Enter the "Super User Password" and re-enter it to confirm. It is normal that it is not displayed.

7dc4cd399ee745da84457106dc6f8a5e.png

After the setting is successful, enter "su root and press Enter, enter the password to enter the super user login state starting with "root"", and adjust the terminal font in "Preference" in the "edit" drop-down menu.

If you do not enter the super user login state, add sudo before the command.

UBUNTU system configuration

1. SSH server configuration server (required)

1. Install ssh server

sudo apt-get install openssh-server

2. Confirm whether sshserver is started (seeing sshd indicates it has been started)

ps -e | grep ssh

3cce2f28543845bbaf9acb30adae7c9a.png

If there is only ssh-agent, then the ssh-server has not been started yet. You need /etc/init.d/ssh start. If you see sshd, it means that the ssh-server has been started.

3. Start sshserver

/etc/init.d/ssh start

a159866135f14bd08a065e3afad55dbf.png

4. SSH configuration (if required)

Modify the configuration file /etc/ssh/sshd_config. Here you can define the SSH service port. The default port is 22. You can define other port numbers such as 32, and then restart the service. It is better to change the suggestion here.

Enter etc/ssh:

d5730705162d4322aac7ca98062e66f2.png

Just make the modifications as shown in the picture above. After modifying the port, you need to annotate it.

Go back to our terminal: 

systemctl status sshd.service

efb055ad925f43539f5fe9970d78832b.png

 

5. Restart sshserver

/etc/init.d/ssh restart

6. Check whether the network tools are installed

Enter -ifconfig in the terminal. If it prompts that there is no command, you need to reinstall it;

Install network tools:

apt-get install net-tools 

(Run under super user root) Run ifconfig to view the IP address of the UBUNTU system: 192.168.117.128 as shown below

39509eeaaca34593958f6018bd7132a1.png

2. Xshell installation under Win11

XShell is a popular and simple networking program designed to emulate a virtual terminal. XShell can access remote servers under different systems through the Windows interface, thereby better achieving the purpose of remote control of the terminal. It supports RLOGIN, SFTP, SERIAL, TELNET, SSH2 and SSH1, making it very convenient to remotely manage Linux hosts. In addition, it also has rich appearance color schemes and style choices.

Please download Xshell from here, free for home/school - NetSarang Website (xshell.com) .

11789b1d54ef417fb3dde3a3ce749aa3.png

f1167b7215ca454aa6e972e0215c3689.png

c2a9455e4e0b4107a3f3c5c296c8e3ea.png

56e8bd6a497e445187a51b5efc36d2ad.png

a369da8dbbdf430088c0cca7bdafe351.png

The above is the installation tutorial. After the installation is completed, register yourself. It's here to click on a link in it via mail. 

131c61d1f0d34482aa56c094f55c9e71.png

Use XShell to connect to Linux server

Xshell initialization interface

37a9476a72b5463cb39c634b2ec8284a.png

Click New to create a new session

66d88eefe4de4141be1a5121e2243e00.png

Copy the IP address 192.168.117.128, open xshell and create a new connection 

  1. Fill in a name for easy identification
  2. Fill in the public IP of the server
  3. Click on User Authentication

57c9bfa582104afa9f15d76a97ee1956.png

9fe90dfbd78c4205b82cc000e0266656.png

Modify the keyboard property to "ASCII 127"

8b794881064f4bd6aa1eeea8f65b9e1a.png

  4859c076e2974a3f9c01a42100d23df6.png

There seems to be something wrong here, and some configuration files need to be modified. 

507b635c773642af90a320b2430a873d.png

Return to the terminal and enter:

vi /etc/ssh/sshd_config 

Find this location:

4007952a24834a8c96c867a689369cd1.png

We make changes:

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

I don’t know how to delete and add the above. I just record it here. You can just use the following method. 

Another way to modify:

c41a7cda46bf4e8abbe8c79b0c816b8b.png

Once in this folder location, enter:

sudo gedit sshd_config

9067214169944e61a6e5eeca9876874e.png

To modify the file directly in this way, remember to press Ctrl+s to save. 

Remember to restart after making changes:

/etc/init.d/ssh restart 

Try again, we finally connected successfully! ! !

2ba7d7d5bc3e40f1a888eda1af335cf6.png

3. Xftp installation under Win11

  • Xshell is used to connect to the server and access files under a specific account on the server and execute specific files ;
  • Xftp is used to connect to the server and interact with files on the PC and files on the server .

We download Xftp from the website where we just downloaded Xshell, free for home/school - NetSarang Website (xshell.com) .

d38202062b6f46fd86d8045728e3bddf.png

76010999c33f4fcdad7d6bcf6c39b1cb.png

b4f1158389bc48678227e76030143670.png

Just wait for the installation.

032d3acc4d104209902189f9bf3a262c.png

057a1c7033ec4f95a39e4bb8399a03c6.png

 Also register yourself.

49cf07b7100a4bb49643a592edb67dc4.png

2ffe1b9d1c744556a5a830472ac20aaf.png

Complete the installation of Xftp.

File transfer demo for xftp

Here, open Xshell, connect to the remote server, enter the directory on the server where you want to transfer files, and click the new file transfer icon.

810caa62832f4bd3a9afe2269c019541.png

e435b158190041cdbd502d240b9ee764.png

  • On the left is the local file directory
  • The right side is the linux server directory
  • Drag the file on the left to the right to upload local files to the Linux server
  • The lower window displays file transfer progress and log information.

For example, I transferred the file unet-pytorch to a folder under the Linux virtual machine.

a489c501ae1a4acf8c449184a4836cb7.png

The above is the installation process of Xftp and a simple file transfer demonstration. Here we open our virtual machine and enter the folder to view.

d394db33318344e88b7a23c3e05fcae3.png

The file was successfully transferred, making it very convenient and simple to transfer files.

 

 

 

Guess you like

Origin blog.csdn.net/m0_62919535/article/details/132759181