Could not start Service[sshd]: Execution of '/sbin/service sshd start' returned 255:

asked 2014-02-06 17:42:42 -0600

ericfrancis gravatar image

updated 2015-04-04 10:33:41 -0600

I am getting this error message when provisioning puppet:

Could not start Service[sshd]: Execution of '/sbin/service sshd start' returned 255:

Any idea why?

default.pp:

package { 'openssh-server':
  ensure => present,
  before => File['/etc/ssh/sshd_config'],
}

file { '/etc/ssh/sshd_config':
  ensure => file,
  mode   => 600,
  source => '/vagrant/manifests/sshd_config',
}

service { 'sshd':
  ensure     => running,
  enable     => true,
  subscribe  => File['/etc/ssh/sshd_config'],
}
edit retag flag offensive close merge delete

Comments

What OS are you running? What happens if you run `/sbin/service sshd start; echo $?` on the commandline?

Stefan gravatar imageStefan ( 2014-02-06 17:59:16 -0600 )edit

I'm using vagrant so I don't have the right permissions without sudo. That said, sudo sbin/... works.

ericfrancis gravatar imageericfrancis ( 2014-02-07 09:25:31 -0600 )edit

There must be something wrong with my sshd_config file. I cannot restart after copying the new file.

ericfrancis gravatar imageericfrancis ( 2014-02-07 09:29:21 -0600 )edit

You never did say what OS you were running here. I'm wondering if the issue is related to: https://github.com/mitchellh/vagrant/issues/1482

blong gravatar imageblong ( 2015-05-20 10:26:50 -0600 )edit