Installing OpenSSH on Solaris

Last published : Jun 19, 2026
On Solaris 10 or later, SSH is installed by default. There is no need to install SSH manually.
On Solaris 9, the easiest way to install OpenSSH is to download and install the precompiled packages from Sunfreeware.com. The following OpenSSH packages are required:
  • GNU Compiler
  • Zlib
  • OpenSSL
  • OpenSSH
To install OpenSSH on Solaris 9
  1. Download the OpenSSH packages from the following locations.
    • GNU Compiler
\<ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/libgcc-3.4.6-sol9-sparc-local.gz\>
  • Zlib
\<ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/zlib-1.2.3-sol9-sparc-local.gz\>
  • OpenSSL
\<ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/openssl-0.9.8l-sol9-sparc-local.gz\>
  • OpenSSH
\<ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/openssh-5.3p1-sol9-sparc-local.gz\>
  1. Unzip the packages and install the files using the following commands:
For the GNU Compiler:
# gunzip libgcc-3.4.6-sol9-sparc-local.gz
# pkgadd -d libgcc-3.4.6-sol9-sparc-local
For Zlib:
# gunzip zlib-1.2.3-sol9-sparc-local.gz
# pkgadd -d zlib-1.2.3-sol9-sparc-local
For OpenSSL:
# gunzip openssl-0.9.81-sol9-sparc-local.gz
# pkgadd -d openssl-0.9.81-sol9-sparc-local
For OpenSSH:
# gunzip openssh-5.3p1-sol9-sparc-local.gz
# pkgadd -d openssh-5.3p1-sol9-sparc-local
  1. Set up the /var/empty directory by running the following commands:
# mkdir /var/empty
# chown root:sys /var/empty
# chmod 775 /var/empty
  1. Add the user sshd by running the following command:
# useradd -g sshd -c 'sshd Privsep' -d /var/empty -s /bin/false sshd
  1. Edit the default /user/local/sshd_config file.
Replace these lines:
Subsystem sftp /user/libexec/sftp-server
PermitRootLogin no
with:
Subsytem sftp /user/local/libexec/sftp-server
PermitRootLogin yes
  1. Generate keys for the server by running the following commands:
# ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N ""
# ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N ""
# ssh-keygen -t rsa -f /usr/local/etc/ssh_host_rsa_key -N ""
  1. Start SSHD by running the following command:
# nohup /usr/local/sbin/sshd &
More Information