1

I have Ubuntu server 14.04 on a server with openssl version 1.0.1f and openssh version 6.6.

In my openssl.cnf I have subjectAltName=${ENV::ALTNAME} so that I can set subjectAltName on the commandline when creating certificates.

When I try to start my ssh daemon manually it fails with:

Auto configuration failed
140031266363040:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:618:line 224

The problem seems to come from openssl failing to start because environment variable ALTNAME is unset and hence sshd can't run.

So my question is how can I set the environment variable ALTNAME to some initial value before the sshd service is started?

4
  • Try to add in /etc/environment which contains a definiton of the $PATH variable
    – AzkerM
    Aug 28, 2015 at 15:16
  • @AzkerM I tried that but it seems to be loaded after the sshd service is started.
    – Jimmy
    Aug 28, 2015 at 15:19
  • You lost me there.. So you've added it already but didn't do a service restart? and now it work?? Am I getting it right?>
    – AzkerM
    Aug 28, 2015 at 15:21
  • I added it to /etc/environment and restarted the machine but the ssh server wasn't running after startup. I verified that the variable ALTNAME had a value and found that I could start the server manually when it was set which is why I came to the conclusion that the ssh service is trying to start before /etc/environment is read. Now I have removed ALTNAME from /etc/environment since it didn't work as intended.
    – Jimmy
    Aug 28, 2015 at 15:26

0

You must log in to answer this question.

Browse other questions tagged .