CentOS5.1遠(yuǎn)程控制升級(jí)安裝ssl配置編譯
對(duì)大家推薦很好使用的CentOS5.1遠(yuǎn)程控制系統(tǒng)之前,像讓大家對(duì)CentOS5.1遠(yuǎn)程系統(tǒng)有所了解,然后對(duì)CentOS5.1遠(yuǎn)程升級(jí)ssh系統(tǒng)全面講解介紹,CentOS5.1遠(yuǎn)程升級(jí)ssh到5.0p1 因?yàn)榉?wù)器在機(jī)房,所以不能刪除ssh后再重新安裝,只能升級(jí)安裝希望對(duì)大家有用。
1.看看現(xiàn)在ssh的版本
ssh -V是4.5的,***的是5.0p1
2.去官方下載包,
然后./configure --prefix=/usr --with-pam --with-md5-passwords --sysconfdir=/etc/ssh發(fā)現(xiàn)老是Can't find recent OpenSSL libcrypto干脆把ssl也升級(jí)下
3.升級(jí)ssl
看下版本openssl version -aOpenSSL 0.9.8b 04 May 2006***的是h了先下載zlib-1.2.3.tar.gz安裝下tar -zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3./configure --shared 不要忘了shared這個(gè)參數(shù)。make make install
CentOS5.1遠(yuǎn)程升級(jí)安裝ssl tar -zxvf openssl-0.9.8h.tar.gz cd openssl-0.9.8h./config shared 一定要帶共享參數(shù)哦make make test make install 這樣ssl就裝在/usr/local/ssl里面啦 替換系統(tǒng)的sslfind / -name openssl/usr/bin/openssl(原來(lái)的)
/usr/lib/openssl(原來(lái)的)
/usr/local/ssl/bin/openssl(新的)
/usr/local/ssl/include/openssl(新的)
下面開(kāi)始替換了
mv /usr/bin/openssl /usr/bin/oldopenssl
mv /usr/lib/openssl /usr/lib/oldopenssl
rm -rf /usr/lib/libcrypto.so
rm -rf /usr/lib/libssl.so
ln -s /usr/local/ssl/lib/libcrytpo.so.0.9.8 /usr/lib/libcrypto.so
ln -s /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
ln /usr/local/ssl/bin/openssl /usr/bin/openssl
cp -r /usr/local/ssl/lib/* /usr/lib/openssl
echo /usr/local/ssl/lib >> /etc/ld.so.conf
ldconfig -vopenssl version -aOpenSSL 0.9.8h 28 May 2008
4。CentOS5.1遠(yuǎn)程控制安裝ssh
tar -zxvf openssh-5.0p1.tar.gz ./configure --with-ssl-dir=/usr/local/ssl --with-zlib --with-pam --with-md5-passwords configure: error: PAM headers not found安裝下rpm -ivh ../pam-devel-0.99.6.2-3.26.el5.i386.rpm (安裝盤(pán)里有)./configure --with-ssl-dir=/usr/local/ssl --with-zlib --with-pam --with-md5-passwords make make install
ssh -V OpenSSH_5.0p1, OpenSSL 0.9.8h 28 May 2008
5.CentOS5.1遠(yuǎn)程配置
vi /usr/local/etc/sshd_config Port 22 Protocol 2(建議只用2,1的有安全性問(wèn)題)
ListenAddress 0.0.0.0
HostKey /usr/local/etc/ssh_host_key
HostKey /usr/local/etc/ssh_host_rsa_key
HostKey /usr/local/etc/ssh_host_dsa_key
SyslogFacility AUTH
LogLevel INFO PermitRootLogin no(安全起見(jiàn)不要root登錄,其他用戶(hù)登,然后su過(guò)去)
RhostsRASAuthentication no IgnoreRhosts yes UsePrivilegeSeparation yes
【編輯推薦】