为什么 ssh-keygen 会创建空的密钥文件?

为什么 ssh-keygen 会创建空的密钥文件?

我启动了 ssh-keygen,回答了所有问题,它报告说密钥已成功生成,但文件为空。为什么?

~ > ssh-keygen -C "my key to github"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/zubba/.ssh/id_rsa): id_github
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_github.
Your public key has been saved in id_github.pub.
The key fingerprint is:
83:73:78:8b:bb:dc:bb:a8:d7:b0:b0:fa:51:30:fd:55 my key to github
The key's randomart image is:
+--[ RSA 2048]----+
|            E    |
|     .     .     |
|    o .   .      |
|     o + .       |
|      = S        |
|    ...= o       |
|    .o.+.        |
|    .oo+.        |
|  .ooo=.+o       |
+-----------------+
~ > ls -l .ssh
итого 8,0K
-rw------- 1 zubba zubba 399 2012-01-10 18:56 authorized_keys
-rw------- 1 zubba zubba 399 2012-01-10 18:56 id_rsa.pub
-rw------- 1 zubba zubba   0 2012-01-18 20:28 id_github
-rw-r--r-- 1 zubba zubba   0 2012-01-18 20:28 id_github.pub
~ >

答案1

您在 $HOME 中启动了 ssh-keygen。文件在那里创建:

ls -ltr ~/id_github*

我猜 .ssh/ 中的文件是旧的?

相关内容