Encryption-free login does not mean that you can log in to a remote host without a password. It is a security authentication implemented by encrypting the public key and decrypting the private key. First, you need to pass it on a Windows hostssh-keygenTo generate a public and private key pair, perform the following steps:The -t parameter specifies the encryption algorithm, and the -b parameter specifies the number of bits of the key pair.

Enter file in which to save the key (C:\Users\ XXX /.ssh/id_rsa): allows you to Enter the location where the key is saved. Default is the location in the parentheses.

Enter passphrase (empty for no passphrase): it asks you to Enter your password for authentication. If this is set, it will ask you to Enter this password for authentication every time you connect. This is not what we want, so just press Enter and set it to empty.

The inputcd .sshCommand to go to the current user’s home directory.sshHide the folder and you can see the two keys you just generated, whereid_rsaIs the private key,id_rsa.pubIs a public key, as shown in the figure:Connect to the Linux remote host and create it in the root directory.sshFolder, and in.sshFolder created under the nameauthorized_keysAnd copy the public key to the file, save and exit, as shown in the figure:At this point, it is complete, the next time the user can directly log in to the remote host without secret.