答案1
ssh-keygen 将要求您输入密码。此时,只需按 Enter 键。再次按 Enter 键确认空密码。如果您在此处不指定密码,则登录时不会要求您输入密码。
# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): [just press ENTER here to save in the default location]
Enter passphrase (empty for no passphrase): [just press ENTER here to save your key without a passphrase]
Enter same passphrase again: [just press ENTER here to confirm the empty passphrase]
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
53:4d:b5:72:46:c1:b8:cd:72:82:3e:7a:08:f5:31:e3 user@host
The key's randomart image is:
+--[ RSA 2048]----+
| .++. |
| o.... |
| ..o++ |
| ..= +++ |
| .S+ + + |
| . .E |
| . o . |
| o . |
| . |
+-----------------+