Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While trying to create rsa keypairs for a project inside the project dir I was experimenting with ssh-keygen's -f option. When I test it in a freshly created directory everything works as expected, but when I try to use the exact same syntax on another equally permissioned directory ssh-keygen just keeps telling me No such file or directory.

In a way it is right saying so, because it is supposed to create these files. (The directory in which it shall work exists.)

The syntax I use for key creation is:

ssh-keygen -q -t rsa -f /abspath/id_rsa -N ""
share|improve this question
is /abspath/ an indication of the command or is it what you actually typed? – Sathya Aug 1 '11 at 12:22
/abspath/ is just meant to indicate that I used an absolute path to a folder there as is required by ssh-keygen – eFrane Aug 1 '11 at 15:48

I am not able to recreate this problem unless I specify a directory that does not actually exist. I suggest that you look at where you're trying to create the key pair, making sure that the directory exist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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