Execution of the command of ssh with open/root/.ssh/id_dsa failed error: Permission denied

0

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?

user1851132

Posted 2013-01-22T15:51:26.557

Reputation:

Does that file already exist? If so, are you able to rm it? – chrisaycock – 2013-01-22T15:55:09.560

Answers

0

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

Santosh A

Posted 2013-01-22T15:51:26.557

Reputation: 101

0

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.

Erik Ekman

Posted 2013-01-22T15:51:26.557

Reputation: 101

-2

chmod 700 ~/.ssh --recursive

will do the job

specializt

Posted 2013-01-22T15:51:26.557

Reputation: 145

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)? – None – 2013-01-22T16:01:12.980

... 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 – 2013-01-22T16:08:56.917