SSH (Secure Shell protocol) we can manage multiple hosts remotely, and it is safe to say at this time that the data it transmits is encrypted with a secret key, as opposed to telent using clear text.
It provides the ability to remotely use the shell and FTP-like services. So we can use it to achieve the function of FTP, that is, we do not have to build an FTP server, only need to build an SSH server.
The secret key used to encrypt the data is paired (public and private)
The private key is left on its own host and the public key is sent to the other machine.
Version2 link detection avoids the insertion of malicious code into the connected device
Customers need to install the SSH client program, of course, if the client is a Linux system, the default already has this program, if it is windows will need to install, to recommend Pietty this program
Server operations generate public and private keys---------> PlainText Transfer public key to client-------------> client calculates their own public and private keys------------> The public key generated by the client is passed to the server
So how is the data transmitted?
Server-to-client
Server transfers data encrypted with client public key-----------> decrypted with server-side private key
The client's secret key is generated by a random operation, so this is not the same as the next one.
Instead of FTP SFTP
operate on a remote host as we do on a Linux host.
Operations on localhost add a lowercase l in front of all commands
The native file is uploaded to the remote host.
put[native directory or file [remote]
put[local directory or file]
File download from a remote host
get[Remote host directory [host]
get[Remote Host directory]
File Offsite Direct Replication SCP
Copy the/etc of this machine to the root user/home of the remote 192.168.1.1
scp/etc [Email Protected]:/home
Copy the home/home of the remote 192.168.1.1 root user to the local/etc directory
SCP [Email protected]:/home/etc
This article is from the "Linux Manually add users" blog, so be sure to keep this source http://9399369.blog.51cto.com/9389369/1585882
SSH Server required knowledge!