ubuntu源码安装openssh

如果不是源出现问题,一下在搞定了,我的ubuntu版本是10.10,源无法更新了,只能用源码安装openssh

安装openssh之前必须先安装:openssl 和zlib,具体看README

出现了一大堆问题,解决方案:

http://blog.csdn.net/stilling2006/article/details/5483639

http://blog.163.com/qiushuhui1989@126/blog/static/27011089201191171135143/

http://www.manucomp.com/solaris_tips/installing_open_ssh.html

包下载:

http://112.91.94.68/gdown_group424/M00/1B/3E/cWmPhVEGFaMAAAAAAFqDNGaSn1w6996425/openssh_pkg.tar.gz?k=0kx3W8pyzpK-AsT2svja6g&t=1359353791&u=3074384150-18089761-eibjrgsk&s=307200&file=openssh_pkg.tar.gz


最恶心的是这个问题:

 

Installing OpenSSH


openssh

/export/home/sources/openssh-3.5p1

To install OpenSSH with default options:

./configure  
make  
make install  

you will get this error

Privilege separation user sshd does not exist 
*** Error code 255 (ignored)

create the non-existing user 'sshd'.

# useradd  -d /var/run -c 'sshd nonpriv userid' -s /bin/false sshd

create the startup script in /etc/init.d, change permissions and setup the links.

#!/bin/sh 
# Startup/shutdown script for 
sshd SSHD=/usr/local/sbin/sshd 
pid=`/usr/bin/ps -Af | /usr/bin/grep $SSHD | awk '{ if ( $3 == "1" ) print $2 }' 
`

case $1 in 
'start')

if [ "${pid}" = "" ] 
then

if [ -x $SSHD ] 
then

$SSHD

fi

fi 
;;

'stop')

if [ "${pid}" != "" ] 
then

/usr/bin/kill ${pid}

fi 
;;

*)

echo "usage: /etc/init.d/sshd {start|stop}" 
;;

esac

# chmod 744 /etc/init.d/sshd 
# cd /etc/rc2.d 
# ln -s /etc/init.d/sshd S99sshd 
# ln -s /etc/init.d/sshd /etc/rc0.d/K99sshd



你可能感兴趣的:(ubuntu源码安装openssh)