Solaris ssh maintenance mode

Resolve ssh maintenance mode issue in Solaris 10

Can you login via console and run the following commands as root user? Past outputs here:

svcs -xv status ssh
cat /var/svc/log/network-ssh*

Look for errors. Another option is to test for errors in sshd config file

sshd -t
sshd -T

Do you see any errors?

#svcs status ssh
STATE STIME FMRI
online Jul_20 svc:/network/nfs/status:default
maintenance 9:50:12 svc:/network/ssh:default

#svcs -xv status ssh
svc:/network/ssh:default (SSH server)
State: maintenance since Sep 08, 2019 09:50:12 AM CDT
Reason: Start method failed repeatedly, last exited with status 255.
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/share/man -s 1M sshd
See: /var/svc/log/network-ssh:default.log
Impact: This service is not running.

  1. When I do # cat /var/svc/log/network-ssh
    /etc/ssh/sshd_config: line 18: Bad configuration option: : /etc/ssh/sshd_configuration: do

/etc/ssh/sshd_config: line 19: Bad configuration option: : /etc/ssh/sshd_configuration.

  1. When I vi into the file, this is what I get

  2. I comment on the error, then
    #svcadm clear ssh
    #svcadm refresh ssh
    #svcs -xv status ssh
    And it still come back to maintenance mode

You need to edit /etc/ssh/sshd_config file and fix errors. Run to see exact error and post it here or fix it

sshd -t
sshd -T
vi /etc/ssh/sshd_config

Once fixed. Restart the sshd service.

Thanks you. Everything works now.

  1. cat /var/svc/log/network-ssh: default.log (to identify the error)
  2. vi into /etc/ssh/sshd_config ( to edit the lines identified as errors)
  3. svcadm clear ssh
  4. svcadm refresh ssh
  5. svcs status ssh ( to display the current state: which should online)