Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Working it agrees http://www.ibm.com/developerworks/ru/library/l-hadoop-1/ 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 stackoverflow.com 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

3 Answers 3

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.

~/.ssh/id_dsa

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

Your Answer

 
discard

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