root@iZwz90zd30oi79nbh14k8cZ:~/sshdTest# ssh-keygen -t rsa
Generating public/private rsa key pair.
#这里输入要生成的文件名
Enter file in which to save the key (/root/.ssh/id_rsa): authorized_keys
#这里输入密码 
Enter passphrase (empty for no passphrase):
#这里重复输入密码 
Enter same passphrase again: 
Your identification has been saved in authorized_keys.
Your public key has been saved in authorized_keys.pub.
The key fingerprint is:
SHA256:BBSsolEzY3yjpwdN7TD0/2/TmdRDFMpT3BlbE9aKIow root@iZwz90zd30oi79nbh14k8cZ
The key's randomart image is:
+---[RSA 2048]----+
| . ..++.      .BO|
|  B *.o.    . ++*|
| o O *.o.    =.o |
|. + + Eoo . . o. |
| o =    S. .  .. |
|. . .    .    ...|
|   .      .  o o.|
|           .o +  |
|           ...   |
+----[SHA256]-----+
root@iZwz90zd30oi79nbh14k8cZ:~/sshdTest# 
root@iZwz90zd30oi79nbh14k8cZ:~/sshdTest# ls
authorized_keys  authorized_keys.pub 

发表评论