3

I launched ssh-keygen, answered all questions and it reported that keys were successfully generated, but files are empty. Why?

~ > 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
~ >
  • Are you looking at the right files? If that is unedited output then id_github should be in the current directory you ran ssh-keygen from, not in an .ssh sub-directory. – Caesium Jan 18 '12 at 16:41
  • Sorry, yes, I ran ssh-keygen in $HOME, but checked files in $HOME/.ssh These files left from my previous attempt, when I entered key faile name as .ssh/id_github. I checked $HOME for id_github* files and found them zero lenght again. – zuba Jan 18 '12 at 22:26
  • 1
    Finally I found a reason why they were generated of 0 lenght. There were background process which consumed all the free space at /home partition by the time I tried to generate keys, so ssh-keygen could not write files content. I wonder why it didn't complain for that? – zuba Jan 18 '12 at 22:30
1

You started ssh-keygen in $HOME. The files get created there:

ls -ltr ~/id_github*

I guess the files in .ssh/ are old ones?

  • Yes, you're right. But those ~/id_github* files were empty as well. – zuba Jan 18 '12 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.