一、ssh-keygen -t rsa
[nameA@machineA]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/nameA/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/nameA/.ssh/id_rsa. Your public key has been saved in /home/nameA/.ssh/id_rsa.pub. The key fingerprint is: bb:3b:14:be:5d:45:ab:72:27:ec:93:21:c6:a3:7d:77 nameA@machineA The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . . | | .X. o . | | .o. + | | .*+.o | | +++C+o E | | . +C++ . | +-----------------+
二、ssh-copy-id knet@192.168.15.14