日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

在Solaris8上安裝SSH( 二 )

第五步:安裝ssh和sshd 這是最后一步 。每一臺(tái)你想通過ssh客戶端進(jìn)行通信的機(jī)器都需要運(yùn)行一個(gè)sshd守護(hù)進(jìn)程 。但是首先,你需要在服務(wù)器機(jī)器上運(yùn)行下面的命令來創(chuàng)建秘鑰信息 。再次確定目錄/usr/local/bin和 /usr/local/sbin是否在你的PATH中 。假如你以前曾經(jīng)運(yùn)行過sshd并且在/usr/local/etc下有秘鑰,那么運(yùn)行下面這些命令將會(huì)覆蓋它們 。用root權(quán)限,輸入:# 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 ""
每一條命令可能要花費(fèi)幾分鐘的事件,這取決于你機(jī)器的速度 。等到每條命令結(jié)束為止 。完成之后,我們可以創(chuàng)建腳本來啟動(dòng)sshd守護(hù)進(jìn)程 。下面編輯一個(gè)簡單的啟動(dòng)腳本,并把它放置在/etc/init.d目錄下(root權(quán)限):
#!/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然后運(yùn)行如下命令:# 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
通過上面這條命令可以手工啟動(dòng)進(jìn)程 # /etc/rc2.d/S98sshd stop 此條命令將停止sshd守護(hù)進(jìn)程 # ps -e | grep sshd 此條命令可以查看是否啟動(dòng)了sshd 至此完成了ssh的安裝 。

推薦閱讀