Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Working it agrees at first I entered into the user of hadoop by means of a command

root@one: /volumes# su hadoop

The invitation was as a result displayed

root@one: /volumes#

and to check I entered into the user of hadoop executed the whoami command, on what gave out me hadoop. Then I tried to execute

root@one: /volumes# ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

therefore I received the following messages

Generating public/private dsa key pair.
open /root/.ssh/id_dsa failed: Permission denied.
Saving the key failed: /root/.ssh/id_dsa

Нow to eliminate this error?

share|improve this question

migrated from Jan 22 '13 at 23:17

This question came from our site for professional and enthusiast programmers.

Does that file already exist? If so, are you able to rm it? – chrisaycock Jan 22 '13 at 15:55

Firstly change path to your home directory that is

root@one: /volumes# cd ~

then generate the dsa key using the below command and press enter for the inputs(passphrase) when asked.

root@one: ~# ssh-keygen -t dsa

Now the file and directory containing the key will be created.


share|improve this answer

You are running as user hadoop, but the home directory still seems to be /root.

Try su -l hadoop instead to do a complete login.

share|improve this answer
chmod 700 ~/.ssh --recursive

will do the job

share|improve this answer
And what the option --recursive does and what for the rights the command chmod 700 ~/.ssh --recursive provides @specializt (I am a beginner in linux)? – user1851132 Jan 22 '13 at 16:01
... what? Im assuming you have problems writing in english, furthermore, im assuming you were asking about the parameters - well : 700 gives only root access (nobody else, which is good) and --recursive makes chmod iterate over everything in that directory – specializt Jan 22 '13 at 16:08

You must log in to answer this question.