執行明令:php
wget http://www.ctohome.com/linux-vps-pack/webmin/upgrade-openssh.shhtml
sh upgrade-openssh.sh linux
升級成功後會自動重啓ssh服務,效果圖以下:
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
========== www.CTOHome.com ============
========== SSH Version ============
OpenSSH_5.8p1, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008web
若是你發現仍是ssh4.x版本,並且提示有錯誤:centos
openssh-clients-5.8p1-24.el5.i386 from centalt has depsolving problems
--> Missing Dependency: libedit.so.0 is needed by package openssh-clients-5.8p1-24.el5.i386 (centalt)
Error: Missing Dependency: libedit.so.0 is needed by package openssh-clients-5.8p1-24.el5.i386 (centalt)
You could try using --skip-broken to work around the problem服務器
那麼,先須要安裝libedit0類庫,以下:ssh
centos 5.x 32位用以下命令安裝ide
rpm -Uvh ftp://ftp.pbone.net/mirror/atrpms.net/el5-i386/atrpms/stable/libedit0-3.0-1.20090722cvs.el5.i386.rpmspa
centos 5.x 64位用以下命令安裝.net
rpm -Uvh ftp://ftp.pbone.net/mirror/atrpms.net/el5-x86_64/atrpms/stable/libedit0-3.0-1.20090722cvs.el5.x86_64.rpm
上面的兩個包推薦使用迅雷下載!
附件裏的包是32位的系統用的 ,將文件的.jpg改爲rpm而後上傳到服務器中安裝便可。
其餘系統,請在這裏找對應版本:
http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/libedit.so.0
若是你仍是用的php5.1,也能夠考慮這個腳本: 一鍵升級php5.2
wget http://www.CTOHome.com/linux-vps-pack/php5.2.sh sh php5.2.sh