Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Modifying Solaris Services

Submitted by on September 9, 2010 – 4:33 pm 3 Comments

Recently I ran into an issue: the sshd service on a Solaris 10 box needed to be used with a custom configuration file. By default, the sshd service will use /etc/ssh/sshd_config. I needed it to use /etc/ssh/sshd_config_custom. I could not just modify the default configuration file. Don’t ask why – it’s complicated. So here’s what I ended up doing and this process is applicable to modifying any other Solaris 10 (and above) service:

See what SSH services are running on the system

# svc | grep ssh

online     16:00:01     svc:/network/ssh:default

Get the details for the “network/ssh” service

# svcs -l network/ssh

fmri         svc:/network/ssh:default
name         SSH server
enabled      true
state        online
next_state   none
state_time   Thu Sep 09 16:00:01 2010
logfile      /var/svc/log/network-ssh:default.log
restarter    svc:/system/svc/restarter:default
contract_id  146
dependency   require_all/none svc:/system/filesystem/local (online)
dependency   optional_all/none svc:/system/filesystem/autofs (online)
dependency   require_all/none svc:/network/loopback (online)
dependency   require_all/none svc:/network/physical (online)
dependency   require_all/none svc:/system/cryptosvc (online)
dependency   require_all/none svc:/system/utmp (online)
dependency   require_all/restart file://localhost/etc/ssh/sshd_config (online)

Create custom sshd configuration file. For this example we will just make a copy of the default sshd_config and then rename the default file to something else.

cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config_custom
mv /etc/ssh/sshd_config /etc/ssh/ssh_config_old

Edit the ssh.xml file containing service configuration details for network/ssh service

vi /var/svc/manifest/network/ssh.xml

Find the following line:

value='file://localhost/etc/ssh/sshd_config />'

And change it to:

value='file://localhost/etc/ssh/sshd_config_custom />'

Edit the sshd startup file:

vi /lib/svc/method/sshd

Fine the following line in the “start” section of the “case” function:


And change it to:

/usr/lib/ssh/sshd -f /etc/ssh/sshd_config_custom

Finally, restart sshd service:

svcadm restart network/ssh

And you are done. They sure made managing services startup easier in Solaris 10 :-)

Print Friendly, PDF & Email


  • che-che says:

    I am in the process of upgrading an app server on a production system. There are multiple machines on the system and to minimize downtime, I was wondering if I can install the upgrade on one machine and copy the installed binaries to other machines?
    Following up with this question… I know that the upgrade modifies only one directory. Now, if the binary copying works, I can take a backup of this directory before upgrade and put it back if the upgrade fails for any reason.. and I should be back with where I started from? Will this be a correct assumption ?

  • Picean says:

    I would like to unlock all the cars and furniture on the sims 2 bon voyage for the PC. Any cheats for this?

  • Bryan J says:

    Ok so I have a PC and I am running Microsoft 7. I am getting pretty interested in networking though, and want to be able to run a server NOT with Microsoft Server series, so I purchased another PC and want to get a LInux OS. Now there are many out there and I want to know what the differences are and what advantages/disadvantages/services they offer. I really want to know hat I can do with a Linux OS that makes them so special and what limits they have as well. i know the names of a few of them Ubuntu, Redhat, solaris, but thats the depth of my knowledge, looking for answers that come from experience. Thanks guys.

Leave a Reply

%d bloggers like this: