13

I'm trying to install hadoop, and I need to restart the sshd service in order to configure the connection between the nodes... However, whenever I write: service sshd restart a message error will be displayed telling me that this service is not recognized.

Any help to install this system?

vefthym
  • 7,422
  • 6
  • 32
  • 58
Dhoha
  • 369
  • 3
  • 6
  • 17

2 Answers2

21

In Ubuntu, install sshd client and server with these commands:

sudo apt-get install openssh-client

and

sudo apt-get install openssh-server

Then, to restart sshd, type:

sudo /etc/init.d/ssh restart

This worked for me, when I had the same problem. You can find more information here.

vefthym
  • 7,422
  • 6
  • 32
  • 58
  • yes, but wait should I reboot the node or restart it? – Dhoha Mar 19 '14 at 08:24
  • Are you running Ubuntu? What happens when you type: `which sshd`? If nothing is output, it means that sshd is not installed. I don't think that you need to reboot. – vefthym Mar 19 '14 at 08:25
  • 1
    No, it didn't work :( and when I write "which sshd", I get /usr/sbin/sshd – Dhoha Mar 20 '14 at 07:31
  • Then, it is not an installation problem. Based on your distribution, check this site and this, I am afraid, is my last guess (put sudo in the front): http://www.starnet.com/xwin32kb/restart_sshd – vefthym Mar 20 '14 at 07:53
  • Now I'm having another problem, if fact I cannot anymore add ssh keys whenever I write ssh-add key.pem it tells me Could not open a connection to your authentication agent. I cannot understand, is it because of these command that you have given to me? – Dhoha Mar 20 '14 at 08:15
4

Try these commands:

For Debian/Ubuntu

/etc/init.d/sshd restart

For RedHat and Fedora Core Linux

/sbin/service sshd restart
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416