Pages

Thursday, February 17, 2011

SSH Installatiion in Solaris 8

Ssh packages need to be manaully installed in Solaris 8.


Installing OpenSSH Packages for SPARC Solaris 8

Installation Steps

{ Link : http://www.sunfreeware.com/openssh8.html
Path to the packages : Woodstock:/jumpstart/Packages/saj - sheena}

Step Zero: Getting the random patches for Solaris 8
Go to Google Groups and search for patch 112438-03 or 112439-02 and you will find a number of discussions that may be of help.
1Step One: To install the above SSH Package one patch is to be installed.

2. Step Two: Following packages are needed
To install the version of openssh from sunfreeware.com, go to the main page and select the files for SPARC/Solaris 8 at the right.



3. Step Three: Installing the packages
With the files downloaded, go to the directory where you put them and run (with the Intel files replacing the SPARC files for the Intel packages):
# gunzip openssh-4.3p2-sol8-sparc-local.gz

# gunzip openssl-0.9.8b-sol8-sparc-local.gz

# gunzip zlib-1.2.1-sol8-sparc-local.gz

# gunzip libgcc-3.3-sol8-sparc-local.gz (if you don't already have gcc 3.3.2 installed)

#
# pkgadd -d openssh-3.8.1p1-sol8-sparc-local

# pkgadd -d openssl-0.9.8b-sol8-sparc-local

# pkgadd -d zlib-1.2.1-sol8-sparc-local

# pkgadd -d libgcc-3.3-sol8-sparc-local (if you don't already have gcc 3.3.2 installed)

# pkgadd -d tcp_wrappers-7.6-sol8-sparc-local (optional)
Once you have installed the packages above, you will have files in various subdirectories of /usr/local. The default location for the ssl files is in /usr/local/ssl. While these files were compiled to avoid the need to put directories like /usr/local/lib and /usr/local/ssl/lib in your LD_LIBRARY_PATH, it is possible that you may need to set this. You should now find ssh in /usr/local/bin and sshd in /usr/local/sbin. Make sure you have /usr/local/bin and /usr/local/sbin in your PATH environment variable.

5. Step Five: Setting up the sshd user and the /var/empty directory
# 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.
The default sshd_config file in /usr/local/etc has the last line
Subsystem sftp /usr/libexec/sftp-server
This may need to be changed to
Subsystem sftp /usr/local/libexec/sftp-server
If you do not do this and attempt to start up sshd, you will get error messages and the daemon will not start.
6. Step Six: Installing ssh and sshd
Each machine that you want to communicate with via the ssh client will need to have an sshd daemon running. But first, you need to run the following three lines to create the key information for the server machine. Again, make sure you have /usr/local/bin and /usr/local/sbin in your PATH. If you have been running sshd before and have keys in /usr/local/etc, running these commands will overwrite them.
As root, enter (/usr/local/bin/ssh-keygen)
# 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 ""
and wait until each is done - this may take a few minutes depending on the speed of your machine.
You might also want to study the /usr/local/etc/ssh_config and /usr/local/etc/sshd_config files to see if there is anything you want to configure differently. Now we can set up scripts to start the sshd daemon in the /etc/init.d directory (as root):

Generally File name would be /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

7. Finally,
# 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
will start the process if you want to do it by hand and
# /etc/rc2.d/S98sshd stop
will stop the sshd daemon. You can check this with
# ps -ef | grep sshd
to see if sshd is running.

No comments: