Home > solaris > solaris: adding openssh to core solaris installation

solaris: adding openssh to core solaris installation

Have you ever confused about how to install a minimal-but-enough installation of solaris OS? Well I had.

It was some time ago I wanted to install Sun Solaris without graphical environment, but I still want some services like ssh and ftp server, and the powerful shell bash. You can always customize the software installation at the installation process, but I found it a bit frustating, because I have to examine the package one-by-one. On the other hand, installing a software by hand from the DVD might takes time to look for the right software since the filename is shortened.

The easiest way to do this is by choosing Core software group installation, then look for your favorite free software from www.sunfreeware.com. You can easily search your software or just browse them by choosing the appropriate processor and OS from the right menu. You can also easily find each software dependencies from every software description hosted there.

The following are the steps to install openssh server into the core solaris 10 x86 installation, if you use sparc, use the sparc version instead. Of course the software packages version I’m using here are only appropriate around the time I’m writing this post.

download :
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssh-5.2p1-sol10-x86-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssl-0.9.8k-sol10-x86-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz

install :

# gzip -d openssh-5.2p1-sol10-x86-local.gz openssl-0.9.8k-sol10-x86-local.gz libgcc-3.4.6-sol10-x86-local.gz
# pkgadd -d openssh-5.2p1-sol10-x86-local
# pkgadd -d openssl-0.9.8k-sol10-x86-local
# pkgadd -d libgcc-3.4.6-sol10-x86-local

setting up sshd :

# mkdir /var/empty
# chown root:sys /var/empty
# chmod 755 /var/empty
# groupadd sshd
# useradd -g sshd -c ‘sshd privsep’ -d /var/empty -s /bin/false sshd
/var/empty should not contain any files.

Generate certificates

# 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 “”

create startup script /etc/init.d/sshd

#!/bin/sh

pid=`/usr/bin/ps -e | /usr/bin/grep sshd | /usr/bin/sed -e ‘s/^  *//’ -e ‘s/ .*//’`
case $1 in
‘start’)
/usr/local/sbin/sshd
;;
‘stop’)
if [ "${pid}" != "" ]
then
/usr/bin/kill ${pid}
fi
;;
*)
echo “usage: /etc/init.d/sshd {start|stop}”
;;
esac

Run the sshd service

# chown root /etc/init.d/sshd
# chgrp sys /etc/init.d/sshd
# chmod 555 /etc/init.d/sshd
# ln -s /etc/init.d/sshd /etc/rc2.d/S98sshd
# /etc/rc2.d/S98sshd start

I will post another software packages installation on separated posts.

source: http://www.sunfreeware.com/openssh.html

  1. No comments yet.
  1. No trackbacks yet.

Switch to our mobile site