Xunwei-3399 development board QT system-using openssh
[Copy link]
OpenSSH is a free and open source implementation of the SSH (Secure SHell) protocol. The SSH protocol family can be used for remote control or file transfer between computers. Traditional methods of implementing this function, such as telnet (terminal emulation protocol), rcp ftp, rlogin, and rsh, are extremely unsafe and use plain text to transmit passwords. OpenSSH provides server-side background programs and client tools to encrypt
data during remote control and file transfer, thereby replacing the original similar services.
Since traditional tools such as telne, rcp ftp transmit data in plain text, there are great security risks to data security, and OpenSSH can encrypt the transmitted data, thereby greatly improving data security.
OpenSSH is divided into two parts: client and server.
Client configuration file: /etc/ssh/ssh_config
Server configuration file: /etc/ssh/sshd_config
Server service script: /etc/rc.d/init.d/sshd
59.1 Development board as server
If we want to connect to the development board remotely via ssh, first refer to 7.7 MobaXterm installation tutorial to install MobaXterm software.
59.1.1 ssh usage
Query the IP address of the development board in the serial terminal, as shown below:
Open the MobaXterm software, click "Session", "SSH" in turn, as shown below:
Log in to the development board as shown below:
59.1.2 sftp usage
Open the MobaXterm software, click "Session", "SSH" in turn, as shown below:
Enter the password "topeet" and enter the file transfer interface as shown below:
59.2 Development board as client59.2.1
ssh usage
The default local user is the user for remote login; remotely connect to Ubuntu in the virtual machine (IP address is 192.168.1.20), as shown below:
ssh 192.168.1.20
Connect to the server as a specified user and enter the following command:
Type exit to exit ssh login.
59.2.2 sftp usage
By default, the local user is used as the user for remote login; remotely connect to Ubuntu in the virtual machine (IP address is 192.168.1.20), as shown below:
sftp 192.168.1.20
Now you can enter commands at the sftp > prompt to contact the files on the server.
If you want to download files from the remote server, enter the following command:
If you want to copy a directory, add the -r parameter to the command, which stands for recursive.
Open the ssh session window and view the downloaded files, as shown in the figure below:
If you want to upload from the local to the server, enter the following command:
put -r /usr/local/music /home/topeet
View the files uploaded by the remote server, as shown in the figure below:
If you want to exit SFTP transmission, just enter "exit".
|