Remote operation of Linux system (Ubuntu and Raspberry Pi)

Remote login

ubuntu set bridge status

Select "Virtual Machine", enter "Settings" and
Insert picture description here
select "Network Adapter", change the network connection mode to "Bridge Mode", click OK to
Insert picture description here
enter the terminal, enter "ifconfig" in the terminal, and then you can view the virtual machine's IP address
If the following interface is not displayed normally, you may need to download

sudo apt install net-tools

After that, the IP address can be displayed normally
Insert picture description here

From the above figure, we can see that the IP address of this machine is 192.168.43.238, and the result of ping by other people under win10 is

Insert picture description here
Then create a new user on the virtual machine to allow others to log in remotely.
Enter sudo adduser user1 on the command line
and set a password (123456) for this new user. After that, keep pressing the Enter key, and finally press "Y" to complete the creation.
Insert picture description here

New user for Raspberry Pi

Connect the Raspberry Pi to the power supply. After the Raspberry Pi is connected to the power supply, it will automatically connect to the Internet. You can open the hotspot for the Raspberry Pi to connect to the Internet. Then record the IP address of the Raspberry Pi. My Raspberry Pi IP address is 192.168.43.113. Ping with a computer and the results are as follows. It
Insert picture description here
can be pinged normally
. Use putty on another computer, enter the IP address of the Raspberry Pi, and click open to
Insert picture description here
enter the created user and password.
Insert picture description here
You can also connect normally.

Use FTP to transfer files remotely under Windows

Remote transfer operation between Windows and ubuntu

Use the command sudo apt-get install vsftpd to install the ftp service under ubuntu
Insert picture description here
Use the following command
cd /etc/
sudo gedit vsftpd.conf
to delete the "#" before the following content in the subsequent interface

write enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
save and exit
back to the terminal, use the following command

service vsftpd restart

Then enter the password in the pop-up window to complete the configuration
Insert picture description here
. Open cmd under Windows and use the command: ftp 192.168.43.238 and
Insert picture description here
then enter the user name and password of ubuntu created before.
Insert picture description here
Successfully log in.
Enter "ls" to list the list
Insert picture description here
and select a file under Windows Transfer to ubuntu, here I select the 123.txt file
Insert picture description here
in the test folder under the F disk . Enter cd test in the command line to enter the test folder of ubuntu, and then the content will be saved here.
Insert picture description here
Use the command put F:\test\123
Insert picture description here
After .txt , go to the test folder of ubuntu to check whether the transfer is successful.
Insert picture description here
You can see that the transfer has been successful.
After trying to get the file
in ubuntu under Windows, first create a file to be obtained under the test folder in ubuntu 321.
Insert picture description here
After txt , go back to Windows and use the cmd command line.
Use the command lcd F:\test.
This command is to save the file obtained later in the test folder under the F drive.
Insert picture description here
Then use the command: cd test
This command is to enter the ubuntu we will get The folder test where the file under the file is located
Insert picture description here
uses the command: get 321.txt to get the file 321.txt. Go
Insert picture description here
back to the test folder of the F disk under Windows to check the result.
Insert picture description here
You can see that the content under ubuntu has been successfully obtained

Remote operation of Windows and Raspberry Pi

Use putty to log in to the Raspberry Pi.
Insert picture description here
Use the command: sudo apt-get install vsftpd
Insert picture description here
after completion, use the command: sudo service vsftpd start
and then use: sudo nano /etc/vsftpd.conf and
then delete the "#" before the following content
anonymous_enable=NO
local_enable= YES
write_enable=YES
local_umask=022
Use command: sudo service vsftpd restart
Insert picture description here
configuration is complete
Open cmd and use command: ftp 192.168.43.113
Insert picture description here
Enter the created user name and password.
Insert picture description here
Login is successful
. Create a folder for testing under the file list: code
Use command: mkdir Code
and then use the command: cd code to enter the code folder.
Insert picture description here
Use the command: put E:\123\work.txt to
Insert picture description here
upload successfully.
Use putty to view the file.
Insert picture description here
Then create a new file under the Raspberry Pi and use nano to write.
Insert picture description here
Insert picture description here
Back to cmd and
use lcd E :\123, save the file here
Insert picture description here
and use get shumeipai.txt to get the file and
Insert picture description here
finally view the result
Insert picture description here

Guess you like

Origin blog.csdn.net/java_creater/article/details/109606933