1. Log In a machine
2, ssh-keygen-t RSA, will generate key file and private key file id_rsa,id_rsa.pub or id_dsa,id_dsa.pub
Generatingpublic/PrivateRSA key pair. Enter fileIn which to save the key (/root/.ssh/ID_RSA): [Enter directly to]enter passphrase (empty for no passphrase): [To establish a password-free SSH trust relationship, enter here directly! Otherwise, after the establishment of the trust relationship, each login to the remote machine requires the password]enter same passphrase again: [Direct enter]your identification has been saved in/root/.ssh/ Id_rsa. Your public key have been saved in/root/.ssh/id_rsa.pub.The key fingerprint is : B4:de:66:2c:c1:< C10>04:AD:7C: 48:7c:f7:94: +:: +[email protected]
Direct Enter 3 times
The key file will be saved in the/ROOT/.SSH directory
At this point, SSH will have a few more files.
Id_rsa private Key File
Id_rsa.pub the public key file, the contents of this file should be placed in other hosts.
View Id_rsa.pub File
Cat/roor/.ssh/id_rsa.pub
Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaicavh6lz9ghftghtfghsv+ksrxvlc9udkq27mg5vhfghaawcgfgllzhfg2dlngotmel/08bp6jmw/ eksq1by1eiouiluiliuliul2rr84x0bb5yshhpgjwupbwr/pymgukyukyukyuthjkiytiliunzdfkuykyuizgvvgptzndn/ rdwjmsafsdvgsdsfsdfdsfsdaflozstycwjrwzyxsrodpby4zjd0gh5zmyhj+vs4ooazz8rthefx+ste0= [email protected]
Linux Login key generation