rc.conf/rc.local not running on jail startup

Status
Not open for further replies.
Joined
Sep 27, 2015
Messages
9
Hello
I'm using a FreeBSD/standard jail. I edited rc.conf to read
sshd_enable="YES"
However, ssh still doesn't start. I also have other commands I wanted run so that Domoticz home automation would work and have access to a certain USB device. These were added to both rc.conf and later rc.local in attempts to get them to work. They still dont' run at jail startup. I can run them manually and everything works afterwards. The permissions for the rc.local and rc.conf are 755.

What am I doing wrong?

Thanks
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Hello
I'm using a FreeBSD/standard jail. I edited rc.conf to read
sshd_enable="YES"
However, ssh still doesn't start. I also have other commands I wanted run so that Domoticz home automation would work and have access to a certain USB device. These were added to both rc.conf and later rc.local in attempts to get them to work. They still dont' run at jail startup. I can run them manually and everything works afterwards. The permissions for the rc.local and rc.conf are 755.

What am I doing wrong?

Thanks
There is more than one rc.conf.

Do this instead, this is the big boy way:

Code:
sysrc sshd_enable=yes
 
Joined
Sep 27, 2015
Messages
9
There is more than one rc.conf.

Do this instead, this is the big boy way:

Code:
sysrc sshd_enable=yes
Thanks for the response. To be honest I hadn't tried any other methods to autostart the service. I assumed since I followed the FreeNAS User Guide and failed that I must have messed up my jail install. From your suggestion I did some more digging.

Prior to making any changes running:
'sysrc sshd_enable'
returned
'sshd_enable: YES'

I then ran the above command
'sysrc sshd_enable=yes'
then
'sysrc sshd_enable'
which returned
'sshd_enable: yes'

I then restarted the jail and ssh is still not running
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
ok, then type this, and tell me what, if anything it says:
Code:
service sshd start
 
Joined
Sep 27, 2015
Messages
9
Right now it says this
'sshd already running? (pid=480).'

Likely because I started it manually by running
' ***@***: /etc/rc.d # ./sshd start'

If I restart the jail I get:
'Performing sanity check on sshd configuration.
Starting sshd.'

And it works
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
You're saying your ssh login now is working?

The default out-of-box configuration in /etc/ssh/sshd_config is generally not what people want. You might want to "permitrootlogin" and also "passwordauthentication".

if you change the config, make sure you
Code:
service sshd restart
 
Joined
Sep 27, 2015
Messages
9
You're saying your ssh login now is working?

The default out-of-box configuration in /etc/ssh/sshd_config is generally not what people want. You might want to "permitrootlogin" and also "passwordauthentication".

if you change the config, make sure you
Code:
service sshd restart

My login always works once I manually start the ssh service. I tried the changes mentioned above without any improvement. My issue is getting the ssh service to start any time the jail is restarted.

Edit:
I have another standard FreeBSD jail where it does start automatically using the instructions from the User Guide. The only thing I have done in the jail where ssh doesn't work is to install Domoticz using the instructions from here:
https://www.domoticz.com/wiki/FreeNAS
 
Status
Not open for further replies.
Top