页面

2012年2月17日星期五

AIX6系统SSHD重启服务

帮朋友忙,从网上查到很多方法,主要是sshd restart,但要找到init.d\sshd

搜索未果

查找AIX6系统中的专门的方法,有这样一篇文章,介绍了整个安装的步骤:http://bbs.chinaunix.net/archiver/?tid-3588807.html

Note on AIX5.1, only need install zlib-1.1.4-4.aix5.1.ppc.rpm

Step #4 - Install OpenSSH
=================================================
bash-2.05b# gunzip openssh-4.1p1_51.tar.z
bash-2.05b# tar xf openssh-4.1p1_51.tar
bash-2.05b# inutoc ./
bash-2.05b# installp -aYF -d ./ openssh

Step #5 - Create user sshd
=================================================
bash-2.05b# mkdir /var/empty
bash-2.05b# mkuser id=74 home=/var/empty/sshd login=false sshd

Note the user ID doesn't have to be 74, but below 100 differentiates it from normal users.

Step #6 - Start OpenSSH
=================================================
bash-2.05b# /usr/sbin/sshd

Step #7 - Define the "sshd" subsystem used by SRC and set start automagically every time you boot your machine
Define the "sshd" subsystem:
bash-2.05b# mkssys -s sshd -p /usr/sbin/sshd -a -D -u 0 -S -n 15 -f 9 -G tcpip

Start the "sshd" subsystem:
bash-2.05b# startsrc -s sshd

Stop the "sshd" subsystem:
bash-2.05b# stopsrc -s sshd

Restart the "sshd" subsystem:
bash-2.05b# refresh -s sshd
0513-005 The Subsystem, sshd, only supports signal communication.
Note this is normal. Use "stopsrc -s sshd; startsrc -s sshd" instead

Set start automagically every time you boot your machine:
Edit /etc/rc.tcpip, adding
# Start up sshd
start /usr/sbin/sshd "$src_running"

And then reboot machine, the "sshd" subsystem will be started automatically.

Step #8 - Remove the "sshd" subsystem used by SRC 
Remove the "sshd" subsystem:
bash-2.05b# rmssys -s sshd
=================================================

查看是否安装成功:lssrc -a | grep ssh

启动sshd服务:startsrc -s sshd

停止ssh服务:stopsrc -s sshd

 

  • 其他

查看命令所在路径:where

命令相关文档:whereis

vi的基本操作

没有评论:

发表评论