免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1721 | 回复: 0
打印 上一主题 下一主题

在solaris8上安装openssh4.7总结 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-26 18:04 |只看该作者 |倒序浏览

1. 在sunfreeware下载如下安装包
zip-2.32-sol8-sparc-local.gz
zlib-1.2.3-sol8-sparc-local.gz
libgcc-3.4.6-sol8-sparc-local.gz      
prngd-0.9.25-sol8-sparc-local.gz
tcp_wrappers-7.6-sol8-sparc-local.gz
openssl-0.9.8f-sol8-sparc-local.gz   
openssh-4.7p1-sol8-sparc-local.gz
2.gunzip解压并安装
pkgadd -d ./zip-2.32-sol8-sparc-local
pkgadd -d ./zip-2.32-sol8-sparc-local
pkgadd -d ./zlib-1.2.3-sol8-sparc-local
pkgadd -d ./libgcc-3.4.6-sol8-sparc-local
pkgadd -d ./prngd-0.9.25-sol8-sparc-local
pkgadd -d ./tcp_wrappers-7.6-sol8-sparc-local
pkgadd -d ./openssl-0.9.8f-sol8-sparc-local   
pkgadd -d ./openssh-4.7p1-sol8-sparc-local
3.在/etc/passwd 增加一行
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
4. 创建一个/var/empty 目录, 然后在/etc/init.d/ 创建一个文件sshd
/etc/init.d/sshd
#! /bin/sh
#
# start/stop the secure shell daemon
case "$1" in
'start')
     # Start the ssh daemon
     if [ -f /usr/local/sbin/sshd ]; then
          echo "starting SSHD daemon"
          /usr/local/sbin/sshd &
     fi
     ;;
'stop')
     # Stop the ssh deamon
     PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep sshd | /usr/bin/awk '{print $1}'`
     if [ ! -z "$PID" ] ; then
          /usr/bin/kill ${PID} >/dev/null 2>&1
     fi
     ;;
*)
     echo "usage: /etc/init.d/sshd {start|stop}"
     ;;
esac
执行以下命令
#chmod +x /etc/init.d/sshd
#ln –s /etc/init.d/sshd /etc/rc2.d/S99sshd
5. 创建另外一个文件/etc/init.d/prngd

#! /bin/sh
#
# start/stop the pseudo random generator daemon
case "$1" in
'start')
     # Start the ssh daemon
     if [ -f /usr/local/sbin/prngd ]; then
          echo "starting PRNG daemon"
          /usr/local/sbin/prngd /var/spool/prngd/pool&
     fi
     ;;
'stop')
     # Stop the ssh deamon
     PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep prngd | /usr/bin/awk '{print $1}'`
     if [ ! -z "$PID" ] ; then
          /usr/bin/kill ${PID} >/dev/null 2>&1
     fi
     ;;
*)
     echo "usage: /etc/init.d/prngd {start|stop}"
     ;;
esac
为prngd创建一个临时目录并执行其他两个命令
mkdir -p /var/spool/prngd.
#chmod +x /etc/init.d/prngd
#ln –s /etc/init.d/prngd /etc/rc2.d/S99prngd
6. 创建密钥
# /usr/local/bin/ssh-keygen -d -f /usr/local/etc/ssh_host_dsa_key -N ""
# /usr/local/bin/ssh-keygen -b 1024 -f /usr/local/etc/ssh_host_rsa_key -t rsa -N ""
7. 在/usr/local/etc/sshd_config对下面一行取消注释
Protocol 2,1
8. 启动进程
# /etc/init.d/prngd start
# /etc/init.d/sshd start


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43930/showart_707158.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP