Table of contents
1. SSH server configuration server (required)
2. Confirm whether sshserver is started (seeing sshd indicates it has been started)
4. SSH configuration (if required)
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
VM17 installation tutorial
Window11 installs VM16 or above. You can download the required files through the network disk.
https://pan.baidu.com/s/1NdZrW1a0oOc9waFzqbH6pQ?pwd=gm7a
提取码:gm7a
You can also download VMware Workstation Pro | CN here
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.
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
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.
Extract the above folder to the D drive or E drive, not the folder with Chinese characters outside.
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.
After the virtual machine is installed, to enable the virtual printer, edit (Preferences) - Settings - Devices.
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.
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
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
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:
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
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
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) .
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.
Use XShell to connect to Linux server
Xshell initialization interface
Click New to create a new session
Copy the IP address 192.168.117.128, open xshell and create a new connection
- Fill in a name for easy identification
- Fill in the public IP of the server
- Click on User Authentication
Modify the keyboard property to "ASCII 127"
There seems to be something wrong here, and some configuration files need to be modified.
Return to the terminal and enter:
vi /etc/ssh/sshd_config
Find this location:
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:
Once in this folder location, enter:
sudo gedit sshd_config
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! ! !
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) .
Just wait for the installation.
Also register yourself.
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.
- 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.
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.
The file was successfully transferred, making it very convenient and simple to transfer files.