OpenSSH key RSA/DSA extract the working principle of RSA/DSA key Linux workstation (localbox) open a remote shellssh authentication method on remotebox: www.2cto.com Command code % ssh drobbins @ remotebox's password: enter the password of the account drobbins on remotebox. If we enter our password on remotebox, ssh will use the Secure Password Authentication Protocol to send our password to remotebox for verification. However, unlike telnet, our password is encrypted here, so it will not be intercepted by people who peek at our data connection. RSA or DSA authentication: Perform one-time configuration step. We copy the public key to remotebox. A public key is used to encrypt messages. A private key can only be used to decrypt messages encoded by a matching public key. On the localbox console, type ssh drobbins @ remotebox. the sshd of Remotebox generates a random number and encrypts the random number with the public key we copied earlier. Www.2cto.com then, sshd sends the encrypted random number back to the ssh running on localbox. The ssh client of localbox decrypts the random number with a dedicated key and sends it back to remotebox. In this way, sshd concluded that we should allow us to log on as long as we hold a matched private key. Public Key installation RSA: Command code % cat identity. pub >> ~ /. Ssh/authorized_keys DSA: Command code cat identity. pub >> ~ /. Ssh/authorized_keys2