Transfer files between host and virtual machine - Xshell installation and usage tutorial

Table of contents

1. Download Xshell

2. Install Xshell

3. Test whether the connection between the host and the virtual machine is possible

4. Use Xshell to transfer files


1. Download Xshell

1. Enter the Xshell official website under the host and click the download button

2. For non-commercial use, click Free License

 3. Enter information in the pop-up interface, and the download link will be sent to the mailbox

 4. Click the download link in the email to download

 

2. Install Xshell

1. Double-click to run the exe file, and click the Next button

 2. Accept the license agreement and click the Next button

3. Click the Browse button, modify the installation path, and then click the Next button 

 4. Click the Install button

 5. The installation is complete

 

3. Test whether the connection between the host and the virtual machine is possible

1. Ping any URL under the virtual machine to test whether the network is smooth

ping www.baidu.com

2. View the IP address of the virtual machine 

ifconfig

3. The prompt command cannot be found, and additional packages need to be installed

sudo apt install net-tools

4. Enter the port number again, and remember the port number [everyone is different, pay attention to modify]

ifconfig

5. Open cmd under the host and use the ping command to test whether the virtual machine can be connected

ping 10.3.101.6

 

4. Use Xshell to transfer files

1. Double-click to run Xshell, click the File -> New button in the upper left corner, and fill in the information in the pop-up interface

名称:随便写
协议:默认SSH
主机:虚拟机的IP地址
端口号:默认22

 2. Use the who command to view the current user under the virtual machine

3. Go back to Xshell, click the user authentication button, and fill in the user name and password of the virtual machine 

 4. Click the connect button and enter sftp + virtual machine IP address in the field

sftp 10.3.101.6

 5. If the connection fails, you need to enter the command under the virtual machine

sudo apt-get install openssh-server

 6. Enter the sftp command again in Xshell, and enter the virtual machine user name in the pop-up interface

 7. Enter the password corresponding to the user name in the pop-up interface

 8. Enter the put command and press Enter, and select the file to be transferred in the pop-up interface

 9. You can see that the transferred files also appear in the virtual machine, and the transfer is successful

Guess you like

Origin blog.csdn.net/yang4123/article/details/126771003
Recommended