SSH升级


zlib升级

./configure -prefix=/usr/local/zlib

make && make install

vi /etc/profile

export LIBRARY_PATH=/usr/local/zlib/lib/:$LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/local/zlib/lib/:$LD_LIBRARY_PATH

export C_INCLUDE_PATH=/usr/local/zlib/include/:$C_INCLUDE_PATH


 

Openssl升级

 

./config  --openssldir=/usr/local/openssl shared zlib

 

make

make install

 

vi /etc/profile

export PATH=/usr/local/openssl/bin:/usr/local/openssh/bin:$PATH


 

echo "/usr/local/openssl/lib" >> /etc/ld.so.conf

 

ldconfig -v|grep local

 

openssl version -a

openssh

 

rpm -e `rpm -qa|grep openssh`  --nodeps

 

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

make

make install

cp -p contrib/redhat/sshd.init /etc/init.d/sshd

ln -s /usr/local/openssh/sbin/sshd /usr/sbin/sshd

ln -s /usr/local/openssh/bin/ssh-keygen /usr/bin/ssh-keygen

chkconfig --add sshd

chkconfig --level 35 sshd on

chmod +x /etc/init.d/sshd



service sshd restart