升级最新版本的openssh6.1
安装zlib
tar zxvf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure --prefix=/usr/local/zlib
make && make install
安装openssl
下载最新包:
http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar zxvf openssl-1.0.1c.tar.gz
cd openssl-1.01c
./config shared zlib --prefix=/usr/local/openssl
make && make install
whereis openssl
cd /usr/bin/
mv openssl openssl.bak
ln -s /usr/local/openssl/bin/openssl .
cd /usr/include/
mv openssl openssl.bak
ln -s /usr/local/openssl/include/openssl .
验证:
openssl version
OpenSSL 1.0.1c 10 May 2012
echo "/usr/local/openssl/lib/" >> /etc/ld.so.conf
ldconfig
安装openssh
下载最新安装包:
http://openbsd.org.ar/pub/OpenBSD/OpenSSH/portable/openssh
-6.1p1.tar.gz
tar zxvf openssh-6.1p1.tar.gz
cd openssl-6.1p1
./configure --prefix=/usr//local/openssh --
sysconfdir=/usr/local/openssh/etc/ssh --with-pam --with-
zlib=/usr/local/zlib/ --with-ssl-dir=/usr/local/openssl/ -
-with-md5-passwords -mandir=/usr/share/man/
make && make install
若提示:configure: error: PAM headers not found
安装 pam* pam-devel 是关键
yum -y install pam*
查看sshd运行状态:
netstat -anptul | grep :22
停掉服务,取消开机启动:
service sshd stop
chkconfig sshd off
设置环境变量:
echo "export
PATH=/usr/local/openssh/bin:$JAVA_HOME/bin:$PATH " >>
/etc/profile
使其生效:
source /etc/profile
设置sshd开机启动:
echo " /usr/local/openssh/sbin/sshd " >> /etc/rc.d/rc.local
启动sshd
/usr/local/opoenssh/sbin/sshd
没有错误提示 [root@localhost ~]# lsof -i:22
查看进程监听状态
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sshd 2686 root 3u IPv6 11222 TCP *:ssh
(LISTEN)
sshd 2686 root 4u IPv4 11230 TCP *:ssh
(LISTEN)
说明服务已经正常启动。
查看ssh版本:
[root@localhost ~]# ssh -v
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address]
[-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F
configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o
option] [-p port]
[-R [bind_address:]port:host:hostport] [-S
ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]
或者:
[root@localhost ~]# telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.1
升级完成。
升级openssh
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
高标准机房综合配线安装
wbzjacky
2019-02-24 13:12:38
VMware Tools 安装、卸载及配置
如沐陽光
2019-02-24 13:00:22
Oracle11g 基于linux 6.3下安装
love壁虎
2019-02-24 12:55:06
apache安装(1)
flashhand
2019-02-23 13:58:28
Centos下安装php5.3.10
flashhand
2019-02-23 13:58:28
CentOS 5.5 下安装 Mysql 5.5
flashhand
2019-02-23 13:58:27
vmlite虚拟机图文安装教程
lhslllj
2019-02-23 13:50:59
IBMDB2数据库软件安装教程
王澤民
2019-02-23 13:48:07
PXE网络全自动安装Linux
LQ_112
2019-02-23 13:47:18
关于Linux下oracle的显示中文乱码或不完整
781732825
2019-02-23 13:43:04
SQL 2008 R2安装部署及端口开放
vip2008
2019-02-23 13:42:18
Windows 7 安装时候提示,无法更改启动项安装失败,以及msr分区
781732825
2019-02-23 13:39:40
安装Discuz!论坛
程張飛
2019-02-23 13:37:42
SQL server 2000在windows 2003中的部署
coinking
2019-02-23 13:34:58