免费注册 查看新帖 |

Chinaunix

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

求助ssh在solaris8下自启动问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-03-17 09:08 |只看该作者 |倒序浏览
本人在solaris8下安装了ssh3.2.0,不知该怎样把它变成随系统一起启动的进程,请各位高手指教呀,谢谢!

论坛徽章:
0
2 [报告]
发表于 2004-03-17 09:25 |只看该作者

求助ssh在solaris8下自启动问题!

# vi /etc/init.d/sshd
#!/bin/sh
#The SSH Server start/stop script.
#
PATH=$PATH:/usr/local/sbin:/usr/local/bin:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/libexec:/usr/local/ssh/lib:/usr/local/ssl/lib:
export LD_LIBRARY_PATH PATH

case $1 in
start)
  echo "Starting SSH Server ...\c"
  /usr/local/sbin/sshd
   if [ $? = 0 ]
    then
     echo " done."
    else
     echo " FAILED!"
   fi
  ;;
stop)
  echo "Stopping SSH Server ...\c"
  /usr/bin/pkill -9 sshd
   if [ $? = 0 ]
    then
     echo " done."
    else
     echo " FAILED!"
   fi
  ;;
restart)
        $0 stop
        $0 start
        ;;
*)
  echo "Usage: `basename $0` start|stop"
  ;;
esac
:wq!
# chmod 0755 /etc/init.d/sshd
# /etc/init.d/sshd start
# /etc/init.d/sshd stop
# /etc/init.d/sshd restart
# ln -s /etc/init.d/sshd /etc/rc2.d/S78sshd
# ln -s /etc/init.d/sshd /etc/rc0.d/K04sshd
# ln -s /etc/init.d/sshd /etc/rc1.d/K04sshd
# ln -s /etc/init.d/sshd /etc/rcS.d/K04sshd


参考一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP