输入命令:ssh-keygen -t rsa,一路enter
[root@VM-4-8-centos git]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:GroNNcshlP+ydiQlig0LuhZ1jy3YRG+ufV7hmtdU0zs root@VM-4-8-centos
The key's randomart image is:
+---[RSA 2048]----+
| |
| o |
| + . .|
|. .o +.o. o.|
|...=*.%oS . . o|
|..o.oO.@. . .. E |
| .. o Oo. oo .|
|.. =.+..+. . |
|. ..o.o+. |
+----[SHA256]-----+
[root@VM-4-8-centos git]#