Learn Linux tips: SSH protocol
Text interface connection server: SSH Server
SSH (Secure Shell Protocol, Secure Shell Protocol), uses the data packet encryption technology to encrypt the data packets waiting for transmission before transmission to the network;
Two server functions are provided:
A remote connection like Telnet uses a Shell server, also known as SSH;
Similar to Sftp-Server of FTP service, Sftp-Server provides more secure FTP service;
Introduction to connection encryption technology
Asymmetric encryption technology: two Public and Private keys are used for encryption and decryption;
Public Key: provides data encryption for remote hosts. You can obtain your Public Key to encrypt data;
Private Key: The data encrypted by your public Key on the remote host can be decrypted locally. Because the private key is very important, it cannot flow out and can only be protected on its own host;
From the client perspective, you must obtain the public key of the server and then send your public key to the server, the obfuscation on the client is composed of the "Public Key of the server + private key of the client;
The SSH protocol has two versions. Due to the connection detection mechanism, Version2 can avoid malicious attack codes inserted during the connection;
The following figure shows the connection process between the SSH server and the client:
The client's key is randomly calculated from this connection, so this connection may be different from the next connection key;
In the client's ~. /Ssh/known_hosts records the Public Key of the host that has been connected, used to confirm that the host has been connected to the correct host;