Problem while generating ssh keys.

Hi all,

I am facing an issue while creating the ssh keys. i am using fedora 9

Please let me know how to solve this issue

[root@localhost .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):       [press enter]
Enter passphrase (empty for no passphrase):                     [press enter]
Enter same passphrase again:                                [press enter]       
open /root/.ssh/id_rsa failed: Permission denied.
Saving the key failed: /root/.ssh/id_rsa.

Thanks,
Kalyan

check .ssh directory permission.

thanks for responding
the directory is having r,w permission for root user

[root@localhost .ssh]# ls -l /root/.ssh/
total 4
-rw-r--r-- 1 root root 395 2010-12-06 16:58 known_hosts
[root@localhost ~]# ls -al

drwx------  2 root root  4096 2010-12-06 16:58 .ssh

ssh without password

thanks satya, the procedure is correct.

but i am getting error message

 /root/.ssh/id_rsa failed: Permission denied.  

error message , can you help me out why this kind of issue occure and how to debug

what could be the solution

Check the permission on the files themselves.