[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] REVISED: OpenSSL & OpenSSH 2.5.2p2 recipe for RAQ2



Ok I _did_ do something stupid, in the last recipe I had made all of my links by hand for the rc directories:
#ln -s /etc/rc.d/init.d/sshd /etc/rc.d/rc0.d/K25sshd
#ln -s /etc/rc.d/init.d/sshd /etc/rc.d/rc1.d/K25sshd
etc etc..

When I told my unix friend he said.. no no no.. two things.. 1) I made the links full path (bad form) and 2) chkconfig will make the links automatically.. so I re-did the recipe ( and tested it..) So below is the new improved OpenSSL & OpenSSH recipe for a RAQ2

elwin



---
Get rid of the current package 2.1.1p2 This is really just the uninstall script from the RPM package

rpm -e openssh-server-2.1.1p2-1
rpm -e openssh-2.1.1p2-1
#Remove entry from installed software
/bin/rm -f /var/lib/cobalt/openssh-server* > /dev/null 2>&1
# Update UI
/usr/admserv/cgi-bin/.cobalt/install/install.cgi < /dev/null > /dev/null 2>&1
# Delete self, how very James Bond
/bin/rm /var/lib/cobalt/uninstallers/openssh-server* > /dev/null 2>&1

---

download the latest openssl and openssh from www.openssl.org and www.openssh.org

---
Build/Make/Install OpenSSL

openssl openssl-0.9.6a:

$ mkdir .log
$ ./config --prefix=/usr/local shared 2>&1 | tee .log/config
$ make 2>&1 | tee .log/make
$ make test 2>&1 | tee .log/make_test
# make install 2>&1 | tee .log/make_install

#vi /etc/man.config
add the following to the MANPATH's
 MANPATH /usr/local/ssl/man

---
Build/Make/Install OpenSSH

openssh openssh-2.5.2p2:
2.3.0p1
$ mkdir .log
$ ./configure 2>&1 | tee .log/configure
$ make 2>&1 | tee .log/make
# make install 2>&1 | tee .log/make_install

---

Copy the following sshd script into /etc/rc.d/init.d/sshd
Omit the ---'s

--- sshd script for init.d
#!/bin/bash

# Init file for OpenSSH server daemon
#
# chkconfig: 2345 55 25
# description: OpenSSH server daemon
#
# processname: sshd (/usr/local/sbin/sshd)
# config: /usr/local/etc/ssh_host_key
# config: /usr/local/etc/ssh_host_key.pub
# config: /usr/local/etc/sshd_config
# pidfile: /var/run/sshd.pid

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

case "$1" in
  start)
	echo -n "Starting sshd: "
	if [ ! -f /var/run/sshd.pid ] ; then
	  case "`type -type success`" in
	    function)
/usr/local/sbin/sshd && success "sshd startup" || failure "sshd startup"
	      RETVAL=$?
	    ;;
	    *)
	      /usr/local/sbin/sshd && echo -n "sshd "
	      RETVAL=$?
	    ;;
	  esac
	  [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd
	fi
	echo
	;;
  stop)
	echo -n "Shutting down sshd: "
	if [ -f /var/run/sshd.pid ] ; then
		killproc sshd
	fi
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd
	;;
  restart)
        $0 stop
        $0 start
	RETVAL=$?
        ;;
  status)
        status sshd
	RETVAL=$?
        ;;
  *)
	echo "Usage: sshd {start|stop|restart|status}"
	exit 1
esac

exit $RETVAL

---
#chmod 755 /etc/rc.d/init.d/sshd
---

chkconfig --del sshd
chkconfig --add sshd

(note chkconfig ssh on or chkconfig off will turn it on and off)

---
You should edit /usr/local/etc/sshd_config (probably should add
a Protocol 2