I am referring to the following tutorial and following the below steps:

SSH Setup and Key Generation

SSH setup is required to do different operations on a cluster such as starting, stopping, distributed daemon shell operations. To authenticate different users of Hadoop, it is required to provide public/private key pair for a Hadoop user and share it with different users.

The following commands are used for generating a key value pair using SSH. Copy the public keys form id_rsa.pub to authorized_keys, and provide the owner with read and write permissions to authorized_keys file respectively.

$ ssh-keygen -t rsa 
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 
$ chmod 0600 ~/.ssh/authorized_keys

When I run the first step $ ssh-keygen -t rsa in my command prompt as shown below:

enter image description here

  1. It's asking me to enter the file for saving. I am new to Linux and wondering which file I would need to enter and in which folder it will get saved?

  2. In the second step, do I need to create authorized_keys folder somewhere?

    $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

closed as off-topic by heemayl, Parto, Fabby, Pilot6, Luís de Sousa Apr 6 '16 at 11:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – heemayl, Parto, Fabby, Pilot6, Luís de Sousa
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Please don't post screenshots of text. Copy the text here and apply proper formatting. By the way, questions on Fedora should be asked at Unix & Linux. authorized_keys is not a folder, but a file. – muru Apr 5 '16 at 7:07
  1. As a beginner, just press enter to use the defaults recommended by your OS. It will automatically use the values recommended in the parentheses.

  2. No, the system will automatically create the necessary files and folders for you.


You should not be in root otherwise it will create this file in root. close the terminal and open it again to exit root. then run this command and when it asks for location enter the suggested address usually like this:


and "authorized keys" is a file not a folder.system creates it automatically.

  • I already created while I was in root before your answer. Is that gonna create any problem? – John Apr 5 '16 at 8:22
  • no. based on my experience it doesn't cause any problem. – Ali Tohidi Apr 5 '16 at 17:23

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