No /etc/init.d/sshd file? (Ubuntu / EC2)

0

2

On a fresh EC2 instance running Ubuntu, I see that there's no /etc/init.d/sshd file. I tried

sudo apt-get install openssh-server

And it shows that openssh-server is already the newest version. How do I get the /etc/init.d/sshd file?

FrankMN

Posted 2010-11-24T22:27:44.757

Reputation: 1

Answers

3

Ubuntu is now using Upstart to do the init and /etc/init.d/ job. Instead of writing /etc/init.d/sshd $ACTION you are now supposed to write service ssh restart or just restart ssh. Note that it is called ssh, not sshd.

whitequark

Posted 2010-11-24T22:27:44.757

Reputation: 14 146

Thanks, this is the correct answer. The sshd in not present in ubuntu 14.04 server, i ran sudo service ssh restart and it work. – Ibn Saeed – 2014-06-15T07:42:05.360

2

On my Ubuntu installation it's /etc/init.d/ssh

Try

dpkg -L openssh-server | grep init.d

dmah

Posted 2010-11-24T22:27:44.757

Reputation: 406

1

Maybe they switched the ssh service over to Upstart config files. Look in /etc/init/.

Ryan C. Thompson

Posted 2010-11-24T22:27:44.757

Reputation: 10 085