0

I have created user with sudo useradd cloudera, User created successfully. Now I want to install ssh in cloudera user. If I execute

cloudera@ubuntu:~$ sudo apt-get install ssh
[sudo] password for cloudera: 
cloudera is not in the sudoers file.  This incident will be reported.

Now How to install ssh in newly added user?

muru
  • 207,228

2 Answers2

1

When you ran sudo adduser cloudera, you used sudo. I am going to refer to this as the primary user.

If you already have ssh installed

If you already have ssh installed, you shouldn't need to do anything. You should be able to ssh into it directly.

If you don't have ssh installed

Install it in the primary user with the command sudo apt-get install openssh-server. This will install it system-wide, enabling it for all users.

If you don't know whether you have ssh installed

Run dpkg -L openssh-server. If there is any output, you have it installed. Otherwise you don't.

fosslinux
  • 3,881
0

In addition to the comments and answers already posted here is a clarification.

From whichever user you executed the command

sudo useradd cloudera

that user obviously have super user privilege.

So, from the new user most probably you could use ssh, as it might be there already installed.

Else, you have three options:

(1) From the user which created "cloudera" install ssh using sudo

(2) Add "cloudera" to sudoers and proceed.

(3) Simply type su and provide the super user password. Then proceed to install ssh.

A S K
  • 42