天天看点

linux openssh升级

卸载以前的

rpm -e --nodeps openssl-devel 

rpm -e --nodeps openssl

下载最新的

Wget [url]http://www.openssl.org/source/openssl-[/url]0.9.8e.tar.gz

tar zvxf openssl-0.9.8e.tar.gz

cd openssl-0.9.8e

./config --prefix=/usr --openssldir=/usr/share/ssl -fPIC threads shared

make

make test 

make install

ln -s /usr/lib/libcrypto.so.0.9.8 /lib/libcrypto.so.4

ln -s /usr/lib/libssl.so.0.9.8 /lib/libssl.so.4

-fPIC 生成位置无关代码

threads  使用线程

 shared 建立共享库

安装openssh

wget [url]http://openbsd.md5.com.ar/pub/OpenBSD/OpenSSH/portable/openssh-4.6p1.tar.gz[/url]

tar zvxf openssh-4.6p1.tar.gz

cd openssh-4.6p1

./configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/libexec/openssh --with-tcp-wrappers --without-zlib-version-check

查看 ssh -v

重启SSH

ps aux |grep ssh

kill -HUP pid

-HUP 让进程自动重启

修改其端口:并把协议 1 “毙”了

/etc/ssh/sshd_config 

#Port 22

#Protocol 2,1

记得在iptables 开放相应的端口哦!

朋友王明达指点:

1、AS 4自带的是openssl 0.9.7,openssh在启动的时候会检查ssl的版本,如果你升级ssl为0.9.8,openssh一定要重新编译;

2、安装openssh时,注意最后“/usr/sbin/sshd -t -f /etc/ssh/sshd_config”命令的输出,关闭配置文件中关于“GSSAPI”的选项;

3、下载openssh时一定要选择带“p1”的文件,不带“p1”的文件是为openbsd准备的;

4、如果远程升级openssh,为了防止升级设备导致无法远程登录,可以先打开telnet,具体的方法是编辑“/etc/xinetd.d/krb5-telnet”文件

中的“disable = no”,然后重启xinetd,升级完毕后再关闭telnet。

本文转自守住每一天51CTO博客,原文链接:http://blog.51cto.com/liuyu/64045,如需转载请自行联系原作者

下一篇: bugzilla安装

继续阅读