redhat安装openssh

下载

openssh-4.6p1.tar.gz

openssl-0.9.8b.tar.gz

zlib-1.2.7.tar.gz

 

先安装zlib.

./configure
make
make install

再安装openssl

./config shared zlib 
make 
make check
make install
mv /usr/bin/openssl /usr/bin/openssl.OFF 
mv /usr/include/openssl /usr/include/openssl.OFF 
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl 
ln -s /usr/local/ssl/include/openssl /usr/include/openssl 
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf 
ldconfig -v 

最后安装openssh

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-dir=/usr/local/ssl --with-md5-passwords --mandir=/usr/share/man  
make  

在make install之前先在/etc/passwd中加入
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

make install  

 

最后输入ssh -v检查版本

你可能感兴趣的:(openssh)